Home All Groups Group Topic Archive Search About
Author
31 Aug 2006 3:52 AM
Earl
Originally posted this in the upgrade forum without an answer:

I had an old VB program that I pulled into VS2005 to see if I could
get anything useful out of the upgrade wizard. Well the program did not have
a Sub Main, so I added that to a module and tried to set that as the startup
object. But now I have this error:

Error 1 'Sub Main' is declared more than once in 'MyUpgradedProject':
MyUpgradedProject.My.MyApplication.Main(Args() As String),
MyUpgradedProject.modFunctions.Main()


Did a search through both the project and the files and cannot find
My.MyApplication.Main. I'm guessing this is some reference that the upgrade
"wizard" created in a buried file. Any ideas?

Author
31 Aug 2006 6:41 AM
Cor Ligthert [MVP]
Earl,

By default has a form project a hidden Sub main class.

Although that should not be used if you are using your own Sub main.

Have you looked in the properties of the application what is the Start up.
If it is a Form than you do not need in fact the Sub main.
However some as by instance Herfried like to start a program with Sub Main.
(By instance for setting the visual styles)

Cor

Show quoteHide quote
"Earl" <brikshoe@newsgroups.nospam> schreef in bericht
news:%23PwrfDLzGHA.4368@TK2MSFTNGP02.phx.gbl...
> Originally posted this in the upgrade forum without an answer:
>
> I had an old VB program that I pulled into VS2005 to see if I could
> get anything useful out of the upgrade wizard. Well the program did not
> have
> a Sub Main, so I added that to a module and tried to set that as the
> startup
> object. But now I have this error:
>
> Error 1 'Sub Main' is declared more than once in 'MyUpgradedProject':
> MyUpgradedProject.My.MyApplication.Main(Args() As String),
> MyUpgradedProject.modFunctions.Main()
>
>
> Did a search through both the project and the files and cannot find
> My.MyApplication.Main. I'm guessing this is some reference that the
> upgrade
> "wizard" created in a buried file. Any ideas?
>
>