From: Miro on
I am trying to follow the following example:

http://www.getdotnetcode.com/GdncStore/free/Articles/VB%20NET%20Sub%20Main%20Procedure.htm

on adding things to my own 'sub main'.

I created a form project and added Form1 and Form2 to the project.

Then in the project property's the startup form is setup as form1. ( i have
the option of Form1 or Form2 ).

How do I get rid of the options in the setup to have a startup form?, and
where to I setup the 'StartupForm' to hit the subMain() here.

When I go to the <MainForm>Form1</MainForm> of the Application.myapp file
and remove it, I get an error that no startup form has been specified.

My objective is to set form2 to be the startup form

Thanks,

Miro

From: Family Tree Mike on
Miro wrote:
> I am trying to follow the following example:
>
> http://www.getdotnetcode.com/GdncStore/free/Articles/VB%20NET%20Sub%20Main%20Procedure.htm
>
>
> on adding things to my own 'sub main'.
>
> I created a form project and added Form1 and Form2 to the project.
>
> Then in the project property's the startup form is setup as form1. ( i
> have the option of Form1 or Form2 ).
>
> How do I get rid of the options in the setup to have a startup form?,
> and where to I setup the 'StartupForm' to hit the subMain() here.
>
> When I go to the <MainForm>Form1</MainForm> of the Application.myapp
> file and remove it, I get an error that no startup form has been specified.
>
> My objective is to set form2 to be the startup form
>
> Thanks,
>
> Miro

Go to the project properties and at the application tab, uncheck "Enable
Application Framework". Now, "Sub Main" should be an option.

This is using VB 2008 Express, so your mileage may vary...

--
Mike
From: Kevin Provance on

"Miro" <miro(a)beero.com> wrote in message
news:%23hiURMzNKHA.3992(a)TK2MSFTNGP04.phx.gbl...
|I am trying to follow the following example:
|
|
http://www.getdotnetcode.com/GdncStore/free/Articles/VB%20NET%20Sub%20Main%20Procedure.htm
|
| on adding things to my own 'sub main'.
|
| I created a form project and added Form1 and Form2 to the project.
|
| Then in the project property's the startup form is setup as form1. ( i
have
| the option of Form1 or Form2 ).
|
| How do I get rid of the options in the setup to have a startup form?, and
| where to I setup the 'StartupForm' to hit the subMain() here.
|
| When I go to the <MainForm>Form1</MainForm> of the Application.myapp file
| and remove it, I get an error that no startup form has been specified.
|
| My objective is to set form2 to be the startup form

Click the Project menu item, select <projectname> Properties. On the
General Tab under Startup Object, select the form you want. Click OK.


From: Miro on
Kevin,

Please read Family Tree Mikes' reply above, that is what I was looking for.

Cheers'

"Kevin Provance" <fu_bm(a)localhost.com> wrote in message
news:ORJoqtzNKHA.4700(a)TK2MSFTNGP05.phx.gbl...
>
> "Miro" <miro(a)beero.com> wrote in message
> news:%23hiURMzNKHA.3992(a)TK2MSFTNGP04.phx.gbl...
> |I am trying to follow the following example:
> |
> |
> http://www.getdotnetcode.com/GdncStore/free/Articles/VB%20NET%20Sub%20Main%20Procedure.htm
> |
> | on adding things to my own 'sub main'.
> |
> | I created a form project and added Form1 and Form2 to the project.
> |
> | Then in the project property's the startup form is setup as form1. ( i
> have
> | the option of Form1 or Form2 ).
> |
> | How do I get rid of the options in the setup to have a startup form?,
> and
> | where to I setup the 'StartupForm' to hit the subMain() here.
> |
> | When I go to the <MainForm>Form1</MainForm> of the Application.myapp
> file
> | and remove it, I get an error that no startup form has been specified.
> |
> | My objective is to set form2 to be the startup form
>
> Click the Project menu item, select <projectname> Properties. On the
> General Tab under Startup Object, select the form you want. Click OK.
>
>

From: Miro on
Thanks FamilyTreeMike, that worked.
I can now put a 'debugger' stop on my code and it works.

One side question,

If I have to Register a dll....

Do I have to put it into the "SUB MAIN", in which case I must uncheck "use
application framework" ?
Are there any big drawbacks to unchecking "use application framework"?

Thanks,

Miro


"Family Tree Mike" <FamilyTreeMike(a)ThisOldHouse.com> wrote in message
news:uIpXxlzNKHA.1280(a)TK2MSFTNGP04.phx.gbl...
> Miro wrote:
>> I am trying to follow the following example:
>>
>> http://www.getdotnetcode.com/GdncStore/free/Articles/VB%20NET%20Sub%20Main%20Procedure.htm
>> on adding things to my own 'sub main'.
>>
>> I created a form project and added Form1 and Form2 to the project.
>>
>> Then in the project property's the startup form is setup as form1. ( i
>> have the option of Form1 or Form2 ).
>>
>> How do I get rid of the options in the setup to have a startup form?, and
>> where to I setup the 'StartupForm' to hit the subMain() here.
>>
>> When I go to the <MainForm>Form1</MainForm> of the Application.myapp file
>> and remove it, I get an error that no startup form has been specified.
>>
>> My objective is to set form2 to be the startup form
>>
>> Thanks,
>>
>> Miro
>
> Go to the project properties and at the application tab, uncheck "Enable
> Application Framework". Now, "Sub Main" should be an option.
>
> This is using VB 2008 Express, so your mileage may vary...
>
> --
> Mike