i want draw a line graph in picture box. How to write the code to draw line represent axis x and axis y. how to put the value behide axis -x and axis -y? thanks.
Printable View
i want draw a line graph in picture box. How to write the code to draw line represent axis x and axis y. how to put the value behide axis -x and axis -y? thanks.
why use the form load , the code cannot function but using the command_click the code can function. how to make it function when form load?
Code:Private Sub Command1_Click()
Picture1.Line (30, 30)-(30, 230), vbWhite
Picture1.Line (30, 230)-(340, 230), vbWhite
End Sub
Code:Private Sub Form_Load()
Picture1.Line (30, 30)-(30, 230), vbWhite
Picture1.Line (30, 230)-(340, 230), vbWhite
End Sub
Using the event activate it works. No clue as to why it doesn't work with load.
Before you draw the lines, add these two lines of code:
vb Code:
Me.AutoRedraw = True Me.Show