The GW-Scripting list is a discussion list for information regarding the development and use of Window-Eyes scripts. Any subscriber of the GW-Scripting list has the ability to post on-topic messages.

From:

 Aaron Smith <aaron@gwmicro.com>

Subject:

 Re: WE And Microsoft Development Environments

Date:

 Fri, Apr 13, 2012 8:35:42 pm
This is a multi-part message in MIME format.
--------------030009000406070605030906
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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.


--------------030009000406070605030906
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 4/13/2012 5:19 PM, RicksPlace wrote:
<blockquote cite="mid:E672EAE2E46A4EFF93D32CCC6D96A3A7@RTCOMP01"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 8.00.6001.19170">
<font face="Arial" size="2">It still needs some testing and the
Form1 grabs focus sometimes even though hidden.</font><br>
</blockquote>
<br>
You can keep the form from displaying by creating a Main() routine,
and putting your startup logic there:<br>
<br>
<span id="ctl00_MTCS_main_ctl03">
<pre class="libCScode" id="ctl00_MTCS_main_ctl03_code" space="preserve">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</pre>
</span>If you then ever need to show the form, you can do
myForm.Show()<br>
<br>
You can do this in C#, too, by changing code in the Main() function
in Program.cs from:<br>
<br>
&nbsp;&nbsp;&nbsp; Application.Run(new Form1());<br>
<br>
to<br>
<br>
&nbsp;&nbsp;&nbsp; Form myForm = new Form1();<br>
&nbsp;&nbsp;&nbsp; Application.Run();<br>
<br>
Aaron<br>
<pre class="moz-signature" cols="72">--
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.</pre>
</body>
</html>

--------------030009000406070605030906--