collinng
asked on
Draw a line in a form - how ?
I wrote: "form1.Line(0,0)-(200,200) , RGB(0,0,255)", and even put a "form1.refresh", but when "form1.show" is executed, there is no line drawn !?!! Can someone shower some help ? Thanks !!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Electrick and Swilt are both correct. In addition, I can also draw a line after show() - as long as the instructions are not in Form_Load() module. However, I still don't understand why Line instruction in Form_Load() module doesn't work - but nebermine, that's just too detailed to bother about. Thanks so much, I appreciate it !
the following code will work
Private Sub Form_Load()
Form1.Show
Form1.Line (0, 0)-(200, 200), RGB(0, 0, 255)
End Sub
OR
Private Sub Form_Paint()
Form1.Line (0, 0)-(200, 200), RGB(0, 0, 255)
End Sub