[Visual Basic] [ Boolean
= ]imagekitcontrolname.GetDpiFromHdcVariant(hDC
As LONG_PTR, Xdpi As Variant, Ydpi As Variant)
[VB.NET] [ Boolean =
]imagekitcontrolname.GetDpiFromHdcVariant(hDC As
Integer(x86) or Long(x64), ByRef Xdpi As Object, ByRef Ydpi As
Object)
[C#.NET] [ bool =
]imagekitcontrolname.GetDpiFromHdcVariant(int(x86) or
long(x64) hDC, ref object Xdpi, ref object Ydpi)
Parameters
Name | Explanation |
---|---|
hDC | The Device Context |
Xdpi | The horizontal resolution (Number of pixels per horizontal inch) |
Ydpi | The vertical resolution (Number of pixels per vertical inch) |
Return Value
Returns True (nonzero) if successful, otherwise returns False (0).
Explanation
The GetDpiFromHdcVariant method retrieves the resolution from the device context.
This method is recommended when using scripting or other languages that require variant types. Also see the GetDpiFromHdc method.
Example:
VB.NET
Dim Xdpi As Object = Nothing
Dim Ydpi As Oject = Nothing
Dim ret As Boolean =
ImageKit1.GetDpiFromHdcVariant(ImageKit1.hDC, Xdpi, Ydpi)
C#
object Xdpi, Ydpi;
Xdpi = Ydpi = null;
bool ret =
ImageKit1.GetDpiFromHdcVariant(ImageKit1.hDC, ref Xdpi, ref
Ydpi);
Differences from ImageKit7/8
The hDC argument has a different type