Is Sub Main Really Necessary?
I loaded a Program that I had partially completed in VB 4. It converted the files, only loaded 2 forms 16 & 17 and then declared it could not find sub main. I thought that Form1 was the default loader and my splash screen
was form1. where should I put a sub main and would that force the loading of all 20 other forms?
Re: Is Sub Main Really Necessary?
Sub Main is necessary if you don't want a Form
Re: Is Sub Main Really Necessary?
add a .bas, put a sub_main in it, have the only line be form1.show, change your startup object to sub_main and you should be all set.
But yeah, sub_main is only necessary if you don't have a form. The above is hopefully a workaround for you.
Re: Is Sub Main Really Necessary?
Re: Is Sub Main Really Necessary?
Now that we've helped you, you can help us by pulling down the Thread Tools menu and clicking the Mark Thread Resolved button which will let everyone know that you have your answer. Also if someone has been particularly helpful, or even particularly unhelpful, you have the ability to affect a their forum "reputation" by rating their post. Your rating won't actually count until you have 20 posts, but the person you rate will see it and know that you appreciate their help.
Re: Is Sub Main Really Necessary?
If you open up Project/Project Properties you can set the startup object.