On 4/13/2012 5:19 PM, RicksPlace wrote:
It still needs some testing and the Form1 grabs focus sometimes even though hidden.

You can keep the form from displaying by creating a Main() routine, and putting your startup logic there:

Sub Main()
   ' Instantiate your form
   Dim myForm as Form1 = New Form1()

   ' Put initialization stuff here instead of in Form_OnLoad

   ' Continue on without displaying the form
   Application.Run()
End Sub

If you then ever need to show the form, you can do myForm.Show()

You can do this in C#, too, by changing code in the Main() function in Program.cs from:

    Application.Run(new Form1());

to

    Form myForm = new Form1();
    Application.Run();

Aaron

--
Aaron Smith
Web Development * App Development * Product Support Specialist
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com

To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.

Reply via email to