>Hello,
>
>I am sure that this is probably really simple, but I cannot find out how to do it.
>
>I would like to turn off screen output while I draw a few controls and then turn screen output back on. At the moment I get quite a bit of flicker, but this would stop that happening.
>
>Pete
Had this code to a standard module:
Private Declare Function LockWindowUpdate _
Lib "user32" _
(ByVal hwndLock As Long) As Long
Public Sub FreezeUpdate(ByVal plngHandle As Long)
LockWindowUpdate plngHandle
End Sub
Now, in your form, you can use it this way:
Call FreezeUpdate(Me.hwnd)
'... Do your stuff here ...
Call FreezeUpdate(0&)
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com