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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to avoid screen refresh flickering 1

Status
Not open for further replies.

vatawna

Programmer
Feb 24, 2004
67
US
I have some panels in a windows form. These panels can be hidden or shown depending on the button being clicked. Each panel has some labels, textboxes, buttons, images, or datagrids. Whenever a button to hide a panel is clicked, the screen doesn't flicker. But when a button to show a panel is clicked, the screen flickers, and it's kinda annoying.

Does anyone know how to avoid screen flickering?

Thanks.
 
Try calling SuspendLayout before the code to show the panel and then ResumeLayout after.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top