hazejean Posted August 6, 2003 Posted August 6, 2003 keep getting error below...can continue and all looks ok?? There was a build error "No accessinbe "Main" method with an appropriate signature was found in form1. These error messages in .net are frustrating Thanks Quote
*Experts* mutant Posted August 6, 2003 *Experts* Posted August 6, 2003 Are trying to use Sub Main to start the program? If not, go to your projects properites and I think (dont have VS.NET available now to check where excatly it is) then General section and set your form as the startup object. Quote
Leaders dynamic_sysop Posted August 6, 2003 Leaders Posted August 6, 2003 have you modified the Sub New? eg: #Region " Windows Form Designer generated code " Public Sub New() '/// has anything been added in here./// MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub i've seen that happen if the starting form has it's Sub New modified. Quote
hazejean Posted August 6, 2003 Author Posted August 6, 2003 my form is set as start-up object. Also have not modified Sub New Thanks Quote
*Experts* Bucky Posted August 6, 2003 *Experts* Posted August 6, 2003 (edited) In the Form1 class, create the following Main method to run the program: Public Shared Sub Main() Application.Run(New Form1()) End Sub [edit]Fixed, thanks Volte, I knew I was forgetting SOME modifier...[/edit] Edited August 6, 2003 by Bucky Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
*Experts* Volte Posted August 6, 2003 *Experts* Posted August 6, 2003 That is only necessary in C#. In VB, the form should be able to create itself. Also, the Sub would need to be Shared for that to work. Quote
hazejean Posted August 6, 2003 Author Posted August 6, 2003 tried all suggestions...still get same error Thanks Quote
*Experts* Bucky Posted August 6, 2003 *Experts* Posted August 6, 2003 When you build the project and that error is displayed in the task list, double-click it. A window pops up, and you can select your form as the startup object there. Rebuild the project and you should be all set; you won't need the Sub Main any more. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
hazejean Posted August 6, 2003 Author Posted August 6, 2003 no window pops up...just get a Beep Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.