I need to create an executable from a VB project without any interface (like in the good old GWbasic/Qbasic etc).
I would like to remove the Form1 from the project. Can't figure out how.
I could just make it visible=false, but that's not what I am looking for.
I have pretty limited VB6 experience and all of that was writing forms based applications.
However, it looks like it's a pretty common topic out there in google land. I found a lot of articles/tutorials by specifically searching for "vb6 console application". I don't know if that's exactly what you need, but it sounds like that's the direction you're going.
One link looked particularly interesting, though since I don't use VB6 I can't say for sure. Anyway, checkout post #54 at the following url:
It looks like there is not "decent" way to do it. I will just have to hide the form1.
I have tons of VB 6 stuff that I did in the last 20 years and I am hesitating to use VS2005 or VS 2008 for the old VB6. I do not want to deal with non compatibility issues. I am not a professional programmer.
VB.NET shares nothing in common with VB6 save for some familiar syntax and a few letters in the language name. VB6 is not at all compatible with .NET and you cannot use .NET dev tools to compile VB6 code, so your fears are probably well founded... ;o)
In short, VB.NET is not VB7. It's VBcompletely-tear-everything-down-and-build-it-from-the-ground-up-in-a-managed-environment.
The default startup object in VB6 is Form1. Since it always gets called at startup, the IDE won't let you delete it... But, you can change this behavior.
In a module, be sure to have a sub named "Main"
Then go to the Project Properties Menu, and change the Startup Object to Sub Main.
Now you can delete Form1.
Just be sure that Sub Main calls the code you need to run at startup...
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert