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!

Refreshing of Form flickers!! Pls Help!? 1

Status
Not open for further replies.

Fori

Programmer
Jun 18, 2003
84
MT
Hi All,

I have form which acts like a calendar having several textboxes (7 x 6). When i create the calendar those textboxes which have no date are made invisible. When i change date i have to make all textboxes visible again, set the calendar and make those invisble again. This creates a flicker and it seems that u can c the textboxes come on and off again!!

How can i remove this flicker?

Thanks
Nick
 

You might try the LockWindowUpdate API...
[tt]
Public Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long
[/tt]

Look it up in your MSDN (help files).

I would think you could use it like so...

lock the window
run through your loop to make your controls visible
unlock the window

Good Luck

 
Seems good enough but how do i implement it please!!

Thanks
Nick
 

Place it in the declaration section of a public module.

Call it in your form prior to doing your thing:

LockWindowUpdate Me.hWnd

Once done doing what you are doing with the controls, call it again like this:

LockWindowUpdate 0&
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top