|
-
Oct 27th, 2002, 07:24 AM
#1
Thread Starter
Junior Member
Problems with Picture Boxes
Hi, this is probably something really basic, but I havent been doing graphics in VB for long and I'm stuck:
I'm using the API SetPixel and GetPixel functions with Picture Boxes in my application, but everytime that I minimize the app all of the pixels that I have set disappear, and the Picture Box reverts to its background color (or if there was a loaded picture in the box, to that).
A similar thing happens when saving the image within the Picture Box. Even if the pixels that I set remain in the box on screen, the saved image on my disc is either of the background color of the Picture Box, or of the originally loaded image.
I'm using Visual Basic 6.0 Enterprise Edition.
Can anyone help?
Thanks,
ISDP
"Mmm, so I hear they have the internet on computers these days..."
-
Oct 27th, 2002, 07:33 AM
#2
Thread Starter
Junior Member
Solved!
Ah wait, I think I've got it, this was in another post:
Originally posted by Shell
You will need to set the autoredraw property of the picturebox to true before drawing, then refresh the picturebox, then use the savepicture function, like this:
Code:
picture1.autoredraw = true
'Do Drawing
'...
picture1.refresh
savepicture picture1.image, filename
Offcourse change picture1 in the name of the picturebox you are drawing on.
-Shell-
"Mmm, so I hear they have the internet on computers these days..."
-
Oct 27th, 2002, 04:01 PM
#3
Addicted Member
You're welcome 
-Shell-
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
|