all groups > dotnet windows forms > march 2008 >
You're in the

dotnet windows forms

group:

Form loading speed optimising


Re: Form loading speed optimising Lloyd Sheen
3/26/2008 6:07:17 PM
dotnet windows forms:

[quoted text, click to view]

What happens to the form between the first load and the subsequent load?

Is it just hidden or is it reloaded?

LS
Re: Form loading speed optimising Lloyd Sheen
3/26/2008 8:07:59 PM

[quoted text, click to view]

Ok since you are closing the form do you keep info from the first open
somewhere? If so this would be the place to hold a boolean value which
could be checked on the opening of the form. A "firsttime" switch if you
want.

How do you control the opening of the form?
LS
Form loading speed optimising John
3/26/2008 9:32:22 PM
Hi

I have a form which does a few operations at start-up which take a long
while. I would like to divide the operations in two parts, one that can run
first time form is loaded and second part that only runs once user opens the
form subsequent time. How do I go about doing this? I presume I can include
first part of operations in form load method, is there an unhide method to
run the second part of operations?

Thanks

Regards

Re: Form loading speed optimising John
3/26/2008 10:17:13 PM
The user can close form the cross button at the top or can press the button
labelled close which does Me.Close.

Thanks

Regards

[quoted text, click to view]

Re: Form loading speed optimising John
3/27/2008 12:51:58 AM
Hi Lloyd

Here is my code;

Dim frm As New frmMyForm
frm.ShowDialog()

[quoted text, click to view]

Re: Form loading speed optimising Spam Catcher
3/27/2008 1:47:15 AM
"John" <info@nospam.infovis.co.uk> wrote in news:#5sMCT6jIHA.2268
@TK2MSFTNGP02.phx.gbl:

[quoted text, click to view]

I believe dialogs are NOT destroyed after they are closed.

So what you can do is:


Private frm as new frmMyForm <-- Place in class


frm.ShowDialog() <-- call as normal.


You don't need to instantiate a new copy each time :-)

--
AddThis Social Bookmark Button