|
-
Aug 17th, 2006, 02:31 AM
#1
Thread Starter
Fanatic Member
[Resolved]hDC Picturebox Autoredraw
This maybe just noobness, but i'm confused.
I thought that when the Autoredraw was set to true that if the picture box was moved off the screen, had something moved over it, or any thing such as that. The Autoredraw will allow the picture to stay intact.
VB Code:
Picture_.AutoRedraw = False
r = StretchBlt(Picture_.hDC, 0, 0, w, h, hdcScreen, 0, 0, wScreen, hScreen, vbSrcCopy)
Picture_.AutoRedraw = True
This is how the image is being drawn onto the picturebox.
The picture box automatically resizes to fit the image (such as the screen width and height). The Problem is that when i move the picturebox around the form (so that bits of it leave the form) it goes to the default background color (white in my case).
How does this happen? I have autoredraw on (Debug.Print Picture_.Autoredraw). If i cause a msgbox to come up over the image, the image stays intact until i move the msgbox (Pressing OK wil keep it intact even though it was over the top of the image).
Can anyone tell me a solution to this problem? This is the image that is going to be saved to a file. So the form won't come up all the time to the user, however the image will still be stored there and if they want to see a preview , only then will the image form show up.
So in other words, the picturebox and the form it's located on will be hidden for most of the time.
Does the hDC stop the autoredraw from working?
Last edited by Slyke; Aug 17th, 2006 at 03:23 AM.
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
|