Archive

Posts Tagged ‘hide form’

Automatically minimize and hide form in VB.Net

April 4, 2008 13 comments

(Or minimize and hide form during startup..)

As per the title above.. perhaps for whatever reason, you’re trying to do it. Cause there was a time I need to do it.

Just add this line to your form_load

Me.WindowState = FormWindowState.Minimized
Me.Hide()

What it does is, everytime your form loads, it will be minimized and hidden. For me, the only way to see the form, is to click on the ‘Show’ button on the system tray. Because I even set the form’s ShowInTaskbar property to false.

Hope it helps somebody.