tags:

views:

19

answers:

3

Hi there,

Is there a way to start a Windows Forms in (VB language) application with the main window not visible? Then later on when an external event occurs, I want to display the form. How can I accomplish this?

Thanks.

+1  A: 

Hint: See the 'Visible' property.

pst
A: 

Initially you just put:

Load SuperAmazingForm

..then when you want to display the form, simply call its Show method as normal.

Doing it this way allows you to interact with the form's objects without the user being aware of it.

Lunatik
A: 

It depends on if you are doing this in Excel/Word or Access. If you are using Excel/Word then the Load MyForm syntax works. However, Access uses it's own variation of the standard UserForm. To load a form hidden you can do:DoCmd.OpenForm "MyAccessForm", WindowMode:=acHidden.

Oorang