getWindowDC erro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,
im using the getWindowDC but getting the error- " Value of type
'System.IntPtr' cannot be converted to integer "
can someone tell me whats wrong??

Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Integer) As IntPtr

Dim me_hdc As IntPtr = GetWindowDC(Me.Handle)

////the error is on "Me.Handle"

hope someone help me...
thanks
 
Declare Function GetWindowDC Lib "user32" (ByVal hwnd As IntPtr) As IntPtr

or

Dim me_hdc As IntPtr = GetWindowDC(Me.Handle.ToInt32)
 
Back
Top