Public Property hDC As Integer
This property must be obtained for each image and allows you to use the Windows API functions to draw into the image. The changes made by using the hDC property change the internal bitmap maintained by the control. The altered image can be printed, saved or copied to the clipboard.
This property is available only at runtime.
Private Type POINTAPI X As Long Y As Long End Type Private Declare Function LineTo Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long) As Long Private Declare Function MoveToEx Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, lpPoint As POINTAPI) As Long Dim ImghDC As Long Dim pTemp As POINTAPI Dim nStore As Long ' Draw an X through the image ImghDC = ImageControl1.hDC ' These calls will draw an X over the image MoveToEx ImghDC, 0, 0, pTemp LineTo ImghDC, ImageControl1.ImageWidth, ImageControl1.ImageHeight nStore = MoveToEx(ImghDC, ImageControl1.ImageWidth, 0, pTemp) nStore = LineTo(ImghDC, 0, ImageControl1.ImageHeight) ' Update the image on screen ImageControl1.Refresh