Results 1 to 8 of 8

Thread: Caption Bar !

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    UK
    Posts
    78

    Caption Bar !

    I have a counter updating a certain label on my form. If I move my form as you do normally using the caption bar at the top of the form all label updaing is stopped e.t.c. whilst the movement is occuring, until I stop, then it carries on.

    Does anyone know a way around this, I suppose I need a type of 'DoEvents' for when the caption bar is pressed (mouse down) or something.

    Anyone?

    TIA

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    You should have a DoEvents in your loop anyway, but that isn't going to help in your present situation.

    If you don't want your counter interuppted, then you should prevent the window from being moved while the operation is going on.

    There are a number of ways of doing this. My first suggestion would be to freeze the mouse when the operation starts, and return mouse control to the user when the operation ends.

  3. #3
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631
    I'm almost positive this has something to do with Windows taking over the thread whenever it (Windows) does something with your form. Same thing happens when a menu is show, too.
    Please rate my post.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    UK
    Posts
    78
    Hack: "You should have a DoEvents in your loop anyway"

    What makes you think I haven't ?

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Because, in your first post you said "I suppose I need a type of 'DoEvents'", so I figured you didn't have one yet.

    My bad if you did/do. Sorry for leaping to an inaccurate conclusion.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    UK
    Posts
    78
    Yes I do have a 'DoEvents' in my loop. What I meant was to try to capture when the caption bar had a mouse down event (if that's possible) and put the equivilent of a 'DoEvents' in it so it doesn't freeze the form controls updating whilst mouse down event.

  7. #7
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    I've tried a wide variety of things, but everytime I hold the mouse down on the caption bar, everything stops. I've not found a way around that.

  8. #8
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    there's an option under settings | display | effects called "show window contents while dragging".
    if it's unchecked, ur form will stop painting itself until the drag is complete.
    just a wild though, but could it be that?

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