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

Loading A Form Invisible

P: n/a
I have an MDI child form that I need to load and run, but I do not want it
displayed.

I tried

Dim myForm as form1
myForm=new form1
myForm.MDIParent=frmMDIParent
myForm.Show

in the Form_Show statement I have
me.hide

I am getting an exception error in windows.forms.dll

Any help to achieve this would be greatly appreciated

Thanks,
Dan
Nov 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a

"Daniel Friend" <da*@donotspam.com> wrote in message
news:OF**************@TK2MSFTNGP12.phx.gbl...
I have an MDI child form that I need to load and run, but I do not want it
displayed.

I tried

Dim myForm as form1
myForm=new form1
myForm.MDIParent=frmMDIParent
myForm.Show

in the Form_Show statement I have
me.hide

I am getting an exception error in windows.forms.dll

Any help to achieve this would be greatly appreciated

Thanks,
Dan


The form "loads" when you do the New Form1...is there code in the Show event
handler that you need to process???

Mythran
Nov 20 '05 #2

P: n/a
* "Daniel Friend" <da*@donotspam.com> scripsit:
I have an MDI child form that I need to load and run, but I do not want it
displayed.

I tried

Dim myForm as form1
myForm=new form1
myForm.MDIParent=frmMDIParent
myForm.Show

in the Form_Show statement I have
me.hide

I am getting an exception error in windows.forms.dll

Any help to achieve this would be greatly appreciated


Simply don't call the form's 'Show' method to prevent the form from
showing.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #3

P: n/a
Daniel,

Where is that Form_Show statement?

Cor
Nov 20 '05 #4

P: n/a
Herfried,
in the Form_Show statement I have
me.hide

I am getting an exception error in windows.forms.dll

Any help to achieve this would be greatly appreciated


Simply don't call the form's 'Show' method to prevent the form from
showing.

Mixing something up with VB6.
(I am really curious for your answer)

Cor
Nov 20 '05 #5

P: n/a
* "Cor Ligthert" <no**********@planet.nl> scripsit:
in the Form_Show statement I have
me.hide

I am getting an exception error in windows.forms.dll

Any help to achieve this would be greatly appreciated


Simply don't call the form's 'Show' method to prevent the form from
showing.


Mixing something up with VB6.
(I am really curious for your answer)


No, I don't mix anything up. I assume the OP refers to 'Form_Load'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #6

P: n/a
> >>> in the Form_Show statement I have
me.hide

I am getting an exception error in windows.forms.dll

Any help to achieve this would be greatly appreciated

Simply don't call the form's 'Show' method to prevent the form from
showing.


Mixing something up with VB6.
(I am really curious for your answer)


No, I don't mix anything up. I assume the OP refers to 'Form_Load'.

Could have been the only good answer otherwise there would have been a long
message.

:-)

Cor
Nov 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.