Option Explicit
Private Declare Sub DrawSpace Lib "c:\dllfile\ProCG3\Debug\ProCG3.dll" (ByVal hDC as IntPtr)
Private Sub cmdDraw_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDraw.Click
Dim hwnd As New IntPtr
hwnd = picSpace.Handle
Dim g As Graphics = Graphics.FromHwnd(hwnd)
Dim hdc As IntPtr = g.GetHdc()