Sub Main?
-
Every time that I make a new project it has an error it says sub main not found. can someone help me figure this out cause it's really torqin' me off. Any suggestions or an answer to my problems would be much appreciated! Sam
Is the problem that you have a Sub Main and you're still getting the message or that you want to know why you need a Sub Main? Charlie if(!curlies){ return; }
-
Every time that I make a new project it has an error it says sub main not found. can someone help me figure this out cause it's really torqin' me off. Any suggestions or an answer to my problems would be much appreciated! Sam
In a new VB.NET Windows Form project, if you remove the original Form1.vb and create a new form or main module, when you compile that project, it will tell you something like "Sub Main was not found in ProjectName.NewForm". Right-click on the project, click properties, then Common Properties, General, Startup Object, choose which thing will be your entry point for the application. In VB.NET, this will either be a Sub Main of a module or class, or a Form. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
-
In a new VB.NET Windows Form project, if you remove the original Form1.vb and create a new form or main module, when you compile that project, it will tell you something like "Sub Main was not found in ProjectName.NewForm". Right-click on the project, click properties, then Common Properties, General, Startup Object, choose which thing will be your entry point for the application. In VB.NET, this will either be a Sub Main of a module or class, or a Form. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
The problem comes in because you either removed the Form1 object, deleted the file like you said in your previous post, or you renamed Form1 improperly. When you did this, the Startup Object automatically reverted to Sub Main, even if you don't have one, since you don't have a valid startup form any more. Then when you created a new form, the Startup Object stayed as Sub Main and won't revert back to a valid form automatically. RageInTheMachine9532
-
The problem comes in because you either removed the Form1 object, deleted the file like you said in your previous post, or you renamed Form1 improperly. When you did this, the Startup Object automatically reverted to Sub Main, even if you don't have one, since you don't have a valid startup form any more. Then when you created a new form, the Startup Object stayed as Sub Main and won't revert back to a valid form automatically. RageInTheMachine9532
Dave, Did you mean to reply to the original poster? I thought my post read like an explanation... JAK What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
-
Dave, Did you mean to reply to the original poster? I thought my post read like an explanation... JAK What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
Sorry! :eek: It was meant for the original poster! :doh: RageInTheMachine9532
-
Every time that I make a new project it has an error it says sub main not found. can someone help me figure this out cause it's really torqin' me off. Any suggestions or an answer to my problems would be much appreciated! Sam