rbulph Posted November 30, 2005 Posted November 30, 2005 I can add a Sub Main to a module as a start point for the application, as I would have done in VB6, but I can't figure out how to specify that this is where the application is to start. The listbox under Application Properties/Application/StartUp Form only allows me to select forms. So how do I do this? Quote
techmanbd Posted November 30, 2005 Posted November 30, 2005 If you want to start from Sub Main Click on Project, drag and click onto Properties Under 'Common Properties' ---> 'General' There is a list box under 'Startup Object' Drag to 'Sub Main' Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
rbulph Posted November 30, 2005 Author Posted November 30, 2005 (edited) If you want to start from Sub Main Click on Project, drag and click onto Properties Under 'Common Properties' ---> 'General' There is a list box under 'Startup Object' Drag to 'Sub Main' Attached is what my screen looks like. Unfortunately, I can't tie in what you're saying with that at all. Under WindowsApplication1 I can get a Properties menu item, clicking on that shows me the properties as displayed in the attachment. That has a Startup form dropdown but this only allows forms to be selected, not Sub Main. I have 2005 Express Version, you probably have a different one. Edited December 1, 2005 by PlausiblyDamp Quote
techmanbd Posted November 30, 2005 Posted November 30, 2005 Yeah I have 2003. So couldn't tell you in 2005 express. I am going to have to download it when I get home for my home computer. So where it says startup form, I take it there isn't an option to start at 'Sub Main'? Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
rbulph Posted November 30, 2005 Author Posted November 30, 2005 Yeah I have 2003. So couldn't tell you in 2005 express. I am going to have to download it when I get home for my home computer. So where it says startup form, I take it there isn't an option to start at 'Sub Main'? Nope. The help file says in relation to Sub Main: Windows Forms applications run on their own. However, the Visual Basic compiler automatically generates a Main procedure in such an application, and you do not need to write one. I've looked everywhere including Application.Designer and Form1.Designer and there's no sign of an automatically generated Sub Main. And the help file doesn't tell you how to specify that you want to use one to start the application. Quote
rbulph Posted December 1, 2005 Author Posted December 1, 2005 You have to uncheck "Enable Application Framework" and then the startup form combobox becomes a startup object box, from which you can choose Sub Main. 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.