Results 1 to 8 of 8

Thread: Redraw Question ...

  1. #1

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Question Redraw Question ...

    I've got an SSTAB control with an array of comboboxes on it.
    When I click a button the combobox values change.
    This is determined by the results of a recordset.
    Sometimes it can be a bit slow, and you can see bits and pieces redrawing before others.
    The SSTAB control, and Combobox controls don't have a REDRAW option I can turn on and off (like a flexgrid for instance).
    Anyone suggest a clever alternative ?

    Maybe power the monitor off and then back on ! ha ha !!

    (That was a joke).

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Redraw Question ...

    Shutting off monitor will work ... ... but I'd rather lock window while updating values:
    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
    4.  
    5. 'usage:
    6. LockWindowUpdate Me.hWnd
    7. 'do your stuff here
    8. LockWindowUpdate False

  3. #3

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Redraw Question ...

    Well I tried that ... but it didn't work. You can still see values changing as the listindex property gets altered in the listboxes.
    I'll have a play around a bit.

  4. #4
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Redraw Question ...

    how about:

    lockwindowupdate
    hide controls
    update them
    show controls
    unlock window

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Redraw Question ...

    Quote Originally Posted by TheBionicOrange
    Well I tried that ... but it didn't work. You can still see values changing as the listindex property gets altered in the listboxes.
    I'll have a play around a bit.
    That doesn't sound right ... sorry ... The whole point of "locking window" is to hide all changes until they done.
    How did you do it?

  6. #6

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Redraw Question ...

    Rhino : Pretty much exactly as you said, i.e.

    LockWindowUpdate Me.hWnd
    ---> I did all my changes here
    LockWindowUpdate False

    BM : I'll try that now.

  7. #7

  8. #8

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Re: Redraw Question ...

    No I don't.
    I don't get it either ?!?!
    Ah well.

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