Results 1 to 5 of 5

Thread: Basic BitBlt/Focus Question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2002
    Location
    Klamath Falls, OR
    Posts
    71

    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.

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    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.


  3. #3
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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!

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2002
    Location
    Klamath Falls, OR
    Posts
    71
    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.

  5. #5
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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
  •  



Click Here to Expand Forum to Full Width