ExtensionMethodsScaledPixels Method |
An extension method for controls: It scales the passed pixels according to the current dpi the control is displayed with.
Namespace:
Jam.Shell
Assembly:
ShellBrowser (in ShellBrowser.dll) Version: 7.1
Syntax public static int ScaledPixels(
this Control pControl,
int pPixels
)
<ExtensionAttribute>
Public Shared Function ScaledPixels (
pControl As Control,
pPixels As Integer
) As Integer
public:
[ExtensionAttribute]
static int ScaledPixels(
Control^ pControl,
int pPixels
)
[<ExtensionAttribute>]
static member ScaledPixels :
pControl : Control *
pPixels : int -> int
Parameters
- pControl
- Type: System.Windows.FormsControl
The pControl to act on. - pPixels
- Type: SystemInt32
The pixels.
Return Value
Type:
Int32An int.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Control. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also