-
Hi
I am writing a program that consists of multiple forms. When a new form is loaded and displayed there doesn`t seem to be a smooth transition to the new form. There is a fair bit of flickering.
I am using the following code to load form2 from form1...
form2.show
I would like to know if there is anything else I can do to stop this flickering.
Thanks
Kelly
-
maybe it just ur monitor?
-
Try using the Load statement before using the .Show method. Generally speaking, if your form contains a lot of controls or reading of data, it will take a lot of time to show. That is perhaps the cause of your problem. So when you load in advance the forms that are to be shown later, they will be shown immediately when needed.
Code:
----------------------------
'Load all the forms when your app starts.
Load Form1
Load Form2
Load Formn
'And so on.
'Then when needed,
Form1.Show
Form2.Show
Formn.Show
---------------------------
And, after using the Load statement, you can try using the .Visible property instead of the .Show method. Like this:
Code:
---------------------------
Form2.Visible
'instead of Form2.Show
---------------------------
Good luck.
-
Code:
Form1.Hide
Load Form1
Form1.Show