Kirk,
To hide a form as it loads, you need to move your initialisation code to a
different place - the constructor - Public Sub New(). For example;
Class StartApplicationHere
Sub Main
Dim gvMainForm As New Form1 ' Form initialising here while hidden
Application.Run(New Form1) ' Form shown here
End Sub
End Class
Class Form1
Sub New()
' Do initialisation here while form is hidden
End Sub
Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
' Shouldn't need to do a lot here
End Sub
End Class
_________________________________
The Grim Reaper
"Kirk Graves" <kr***********@yahoo.com> wrote in message
news:ea**************@TK2MSFTNGP10.phx.gbl...
Can anyone tell me why this code does not work?
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.Hide()
End Sub
If runs, but the form won't hide itself. This is the main form of the
application.
to duplicate, just start a brand new windows application, double click the
default form and enter Me.Hide().
I really need this to work. Any thoughts?
Thanks
Kirk