By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,530 Members | 880 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,530 IT Pros & Developers. It's quick & easy.

Two programs working on a same control

P: 1
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:

Private Sub Form_Load()
Picture1.Line (100, 100)-(3000, 3000), vbBlue, B
l& = Picture1.hDC
RetVal = Shell("Projet2.exe " & Str$(l&), 1)
End Sub

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 Sub

... but it does'nt work!
did someone get an idea?
May 8 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.