Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screen Flicker 1

Status
Not open for further replies.

RobS23

Programmer
Jun 4, 2001
161
GB
I have a form containing 2 list boxes. These list boxes are being regularly updated. I need to try and stop the nasty flickering as they are repopulated. In Access there is the Echo method, which allows the screen updating to be turned off and back on after an operation is completed.

Can someone tell me the VB equivalent?
 
Here is one solution using the LockWindowUpdate API.


Put this declaration at the top of a module to make it global:

Public Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long


To turn off refresh:

LockWindowUpdate frmWhatever.hWnd

To turn it back on:

LockWindowUpdate 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top