|
-
May 31st, 2002, 04:49 PM
#1
Thread Starter
Lively Member
Basic BitBlt/Focus Question
Here's the dealio. I've got a form. On it is a pic box. I am drawing things on the pic box with bitblt. When the form is covered, loses focus, etc. the BitBlt images are gone, i want to redraw these when the form regains focus, BUT the GotFocus event isn't working. I threw the call to my bit blt function in the got focus event of the form, and its not working, anyone have any ideas? I could put a timer on there, but I'd rather not do it that way because it causes the images to blink, or flicker. It just doesn't look good. Thanks.
-
Jun 1st, 2002, 05:02 AM
#2
Not NoteMe
If you don't want to use the autoredraw property, then you could always put it in the paint function (although this may make the form a bit jerky if there's a lot of BitBlting).
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Jun 1st, 2002, 05:07 AM
#3
Frenzied Member
the problem with the paint function is that it is caleld way to often (I think even when blitting on the form, but I can't say for sure)
I did not mention it since he already said he does not want to use a timer because that could cause flickering so I guess the paint function would be inacceptable.
Sanity is a full time job
Puh das war harter Stoff!
-
Jun 3rd, 2002, 12:28 PM
#4
Thread Starter
Lively Member
I thought that possibly the GotFocus was calling the bitblt too soon, so I just threw a msgbox in there to see if it was working at all. And it didn't pop the box either, so perhaps if I could get it to work at alll, and maybe put a quick sleep on there to give the form time to display.
-
Jun 6th, 2002, 09:32 AM
#5
Frenzied Member
well I doubt sleep will do it but you could try a loop with do loop
put a doevents into it and let the loop run for a bunch of milliseconds, that is no great coding though...
have you ever tried me.show ? (and a doevents afterwards)
Sanity is a full time job
Puh das war harter Stoff!
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
|