By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,820 Members | 996 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,820 IT Pros & Developers. It's quick & easy.

Loading Windows Forms

P: n/a

Is there a way to load a windows form into memory without showing it. You
used to be able to do this in the god old days.

TIA
--
Helen
Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies

P: n/a

Dim MyForm as New MyFormClass

(it's hidden until you either:)

MyForm.Show
MyForm.ShowDialog
"Helen Trim" <He*******@discussions.microsoft.com> wrote in message
news:F5**********************************@microsof t.com...

Is there a way to load a windows form into memory without showing it. You
used to be able to do this in the god old days.

TIA
--
Helen

Nov 21 '05 #2

P: n/a
Robin,
Dim MyForm as New MyFormClass

(it's hidden until you either:)

MyForm.Show
MyForm.ShowDialog


You probably mean to make a module with a sub main in it with this code?

Cor

Nov 21 '05 #3

P: n/a
Cor,

"Cor Ligthert [MVP]" <no************@planet.nl> schrieb:
Dim MyForm as New MyFormClass

(it's hidden until you either:)

MyForm.Show
MyForm.ShowDialog


You probably mean to make a module with a sub main in it with this code?


It doesn't really matter where you place the code... :-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4

P: n/a
Herfried,
It doesn't really matter where you place the code... :-).


What you think of this

Private sub MyFormClass_load etc

Dim MyForm as New MyFormClass
(it's hidden until you either:)
MyForm.Show
MyForm.ShowDialog

End Sub

What is in your opinion the effect?

Cor

Nov 21 '05 #5

P: n/a
Cor,

"Cor Ligthert [MVP]" <no************@planet.nl> schrieb:
It doesn't really matter where you place the code... :-).


What you think of this

Private sub MyFormClass_load etc

Dim MyForm as New MyFormClass
(it's hidden until you either:)
MyForm.Show
MyForm.ShowDialog

End Sub

What is in your opinion the effect?


Well, you are creating a new instance of a certain form type. If creating
the instance is a costly process, this can be performed when the application
is idle to accelerate showing the form later.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6

P: n/a
Herfried,
It doesn't really matter where you place the code... :-).


What you think of this


Well, you are creating a new instance of a certain form type. If creating
the instance is a costly process, this can be performed when the
application is idle to accelerate showing the form later.

I mean in combination with your reply to me, you probably don't believe it,
however I know what the code I showed does. However it will show (three)
forms when the load event is done.

:-)

Cor
Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.