Hello,
From a main program drawing on a PictureBox, i would like to call a second program (.exe) wich could design on the same PictureBox. I'd try this:
Main:
Private Sub Form_Load()
Picture1.Line (100, 100)-(3000, 3000), vbBlue, B
l& = Picture1.hDC
RetVal = Shell("Projet2.exe " & Str$(l&), 1)
End Sub
Second:
Private Declare Function Polygon Lib "gdi32" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Sub Form_Load()
a$ = Command()
l& = CLng(Val(a$))
typ& = 4
ReDim lppoints(typ& - 1) As POINTAPI
lppoints(0).x = 200: lppoints(0).y = 200
lppoints(1).x = 200: lppoints(1).y = 2000
lppoints(2).x = 2000: lppoints(2).y = 2000
lppoints(3).x = 2000: lppoints(3).y = 200
Res& = Polygon(l&, lppoints(0), typ&)
End
End Sub
... but it does'nt work!
did someone get an idea?
Jack13