This method retrieves the image from the screen device context.

[Visual Basic]   [ Long = ]imagekitcontrolname.PrintDraw.GetImageFromHdc(hDC As Long, Width As Long, Height As Long, BitCount As Integer)
[Visual C++]     [ long = ]imagekitcontrolname.GetPrintDraw().GetImageFromHdc(long hDC, long Width, long Height, short BitCount)

Parameters

Name Explanation
hDC The screen device context
Width The width of the retrieved image (in pixels)
Height The height of the retrieved image (in pixels)
BitCount The number of bits per pixels in the image you want to create

Return Value

Returns the image handle of the raster image if successful, returns NULL (0) when not successful.

Explanation

The GetImageFromHdc method retrieves the image from the screen device context and returns it to the image data.

Note: Some components such as a PictureBox, do not always retrieve the height and width of the actual image. In such cases there can be problems with the GetImageFromHdc method retrieving the image from the screen device context.

 

The ImageKit8 ActiveX is a product created by Newtone Corporation