Home All Groups Group Topic Archive Search About

Sub Main in Windows App

Author
17 Mar 2006 11:07 PM
swartzbill2000
Hello,
I have a Windows App. I want to change my startup to Sub Main. How do
you run a Windows App from Sub Main?
Bill

Author
17 Mar 2006 11:23 PM
I Don't Like Spam
swartzbill2***@yahoo.com wrote:
> Hello,
> I have a Windows App. I want to change my startup to Sub Main. How do
> you run a Windows App from Sub Main?
> Bill
>

Create a module, place

Public Sub Main()

End Sub

In it, then go to project properties and change the startup to Main

Chris
Author
18 Mar 2006 11:45 AM
Herfried K. Wagner [MVP]
<swartzbill2***@yahoo.com> schrieb:
> I have a Windows App. I want to change my startup to Sub Main. How do
> you run a Windows App from Sub Main?

In addition to the other replies, simply create a 'Sub Main', set the
application's startup object to "Sub Main" in the project properties and use
'Application.Run(<form>)' to display the main form.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>