|
-
Dec 31st, 2002, 01:32 AM
#1
Thread Starter
Addicted Member
picturebox
hello everyone !
i've a graph in a picturebox. i justwant to change the labels in the picturebox at the click of a button. i'm using picture1.print for the same. now the prob is when i cliock on the button, the labels are not getting refreshed. i'm using picture1.refresh after picture1.print .... but no use !
but when i draw the graph again with a new set of values, and then display the labels ... the labels are shown correctly.
tell me some way to refresh the picturebox to show the current labels at the click of a button.
thanks
shruti !
-
Dec 31st, 2002, 03:24 AM
#2
PowerPoster
I am a little confused by your question here. If you are using a label control, why are you using the Picture1.Print method to write to the label.
-
Dec 31st, 2002, 03:38 AM
#3
Thread Starter
Addicted Member
i'm not using a label control,
by label i mean the label on the graph used to display the x-axis labels. which keep changing at a click. i want to change the labels on the click using print method. but my prob is refreshing it .....
i hope i'm making some sense.....
shruti !
-
Dec 31st, 2002, 04:31 AM
#4
I'm somewhat confused as well. If you place the code in the click method to print the labels why shouldn't they be reprinted every time you click on it? What are you exactly trying to do?
-
Dec 31st, 2002, 04:53 AM
#5
Fanatic Member
me three!
Yea, me three, i am confused on this too. I dunno what exactly ur trying to do with the print command... doesnt the print command write text into a file?
like say:
VB Code:
Private Sub Command1_Click()
Open C:\File.txt For Output As #1 ' opens the file
Print #1, "Text here which prints into the file on first line"
Print #1, "Text here on second line"
Print #1, "" ' makes a blank line, i think...
Print #1, "Then you get this on the 4th line yes?"
Close #1
End Sub
Isnt that what the print command does? not anything to with pictures? I may be wrong, but that is what i thought.
Last edited by LITHIA; Dec 31st, 2002 at 04:56 AM.
-
Dec 31st, 2002, 04:54 AM
#6
PowerPoster
Is the graph you are using a different control? In that case, you will have to refresh the Graph control instead of the PictureBox.
Last edited by amitabh; Dec 31st, 2002 at 05:07 AM.
-
Dec 31st, 2002, 05:00 AM
#7
PowerPoster
LITHIA,
You can use the Print Function to Print on a form or a PictureBox too. Try this code:
VB Code:
Me.Print "Print to Form"
Picture1.Print "Print to PictureBox"
-
Dec 31st, 2002, 05:26 AM
#8
I think it's more efficient if you use labels on the picturebox. Then every time you make changes to them you don't need to clear the picture to avoid printing over the previous stuff. Moreover you control labels easily by playing around with the visible property.
-
Dec 31st, 2002, 05:42 AM
#9
PowerPoster
Yes, a lable would definitely be a more better option if you can use one.
-
Jan 16th, 2003, 06:17 AM
#10
Fanatic Member
oooooohhhhhhhh.... interestin, any more info on print command? what does it actually do with picturebox's or forms then?
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
|