|
-
Mar 29th, 2007, 09:36 AM
#1
Thread Starter
Lively Member
how to draw line in picturebox to represent axis-x,axis-y
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.
-
Mar 29th, 2007, 11:23 AM
#2
Thread Starter
Lively Member
Re: how to draw line in picturebox to represent axis-x,axis-y
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
-
Mar 29th, 2007, 12:26 PM
#3
Addicted Member
Re: how to draw line in picturebox to represent axis-x,axis-y
Using the event activate it works. No clue as to why it doesn't work with load.
-
Mar 29th, 2007, 12:46 PM
#4
Re: how to draw line in picturebox to represent axis-x,axis-y
Before you draw the lines, add these two lines of code:
vb Code:
Me.AutoRedraw = True
Me.Show
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|