Application start-up events without start-up form

J

John

Hi

My app needs to use the MyApplication_Startup and
MyApplication_StartupNextInstance events but do not need the start-up form.
How can I get rid of the start-up form as I can't select the Sub Main when
application framework is enabled.?

Thanks

Regards
 
T

Tom Shelton

Hi

My app needs to use the MyApplication_Startup and
MyApplication_StartupNextInstance events but do not need the start-up form..
How can I get rid of the start-up form as I can't select the Sub Main when
application framework is enabled.?

Thanks

Regards

You can't... You have to use a form as your startup object when you
use the framework.
 
B

Bill McCarthy

What is it you are trying to do ?
If you want to change the startup from at runtime you can do that in the
Startup event by setting Me.MainForm to the appropriate form.
 
J

John

Hi

I need the vb.net app to work in background (so to speak) as it will get an
event by an external app periodically by it (vb.net app) being called with a
parameter by the external app. I am using MyApplication_Startup and
MyApplication_StartupNextInstance events to pick up that command line
parameter but as I need to do this in background I do not need to show the
form.

Should I use an app type other than Winform to accomplish this?

Thanks

Regards
 
B

Bill McCarthy

Yeh, I'd say just use a Sub Main. Uncheck the "Enable Application Framework"
box, then select a Sub Main in the startup object drop down.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top