Start-up from Sub Main problem

J

John

Hi

I have created below class with a Sub Main to use for start-up. Problem is
when I go into project->properties->Application and drop down the 'Startup
form', my class isn't listed so I can't select it. How can I set the app to
use Sub Main as the starting point?

Thanks

Regards


Friend Class clsAppManager

<STAThread()> _
Shared Sub Main()
Application.Run(New frmMyForm())
End Sub

End Class
 
B

Bryan Phillips

Uncheck "Enable Application Framework" and you will be able to select
"Sub Main".

You will have to manually add code for the functionality you lose by
turning it off.
 

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