Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

i have an application that for use it, it's needed the login.
The login page is into a panel, and if the login is correct, the panel is going to hide.
On hiding, there is a delay on creating the controls under the panel.
How i can fix it?

Thanks
Posted
Comments
Manas Bhardwaj 8-Nov-14 10:18am    
Not clear. Please provide more details!
Gianmarco V. 8-Nov-14 10:24am    
Small Gif.

https://cloud-de1.forhost.org/public/images/qa.gif
DamithSL 8-Nov-14 10:23am    
how you hide? please include related code in the question
Gianmarco V. 8-Nov-14 10:25am    
Just via panel.hide();
BillWoodruff 8-Nov-14 10:23am    
The Login "page" is a separate Form that you present with 'ShowDialog ?

1 solution

Assuming:

1. this is a WinForms application

2. at design-time all Controls in the Main Form have their visible property set to 'true.

Try this:

0. do not hide the log-in Panel and make it visible at run-time in the Form Load EventHandler: at design-time position the visible Panel used for log-in first in the z-order (so it's on top of all other Controls), and blocks the view of (hides) all other Controls.

1. set the 'DoubleBuffered Property of the Main Form to 'true in the Form at design-time using the Property Editor.

If that doesn't change the delay in rendering the Controls when you hide the Panel when log-in is complete then:

1. if you are doing anything involving Update/Refresh/Invalidate of the Form, or of Controls on the Form underneath the log-in Panel, add details of that to your question.

2. if you have modified the Program.cs file in any way, describe that in your question.

3. if you have made any direct use of this.SetStyle or Control.SetStyle, describe that.
 
Share this answer
 
Comments
Maciej Los 8-Nov-14 13:54pm    
[joke]4. if you have any other questions, ask[/joke]
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900