If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Visual Basic > Visual Basic - Remove Form1

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-09-10, 08:03
kato01 kato01 is offline
Registered User
 
Join Date: Nov 2004
Posts: 17
Visual Basic - Remove Form1

Hello,

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.

Thanks


kato01
Reply With Quote
  #2 (permalink)  
Old 03-09-10, 09:10
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
VB what? .NET? Why wouldn't you just do a console application?
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #3 (permalink)  
Old 03-10-10, 10:37
kato01 kato01 is offline
Registered User
 
Join Date: Nov 2004
Posts: 17
Visual Basic - Remove Form1

It's Visual Basic Professional 6 and there is no reference in the help for this.

Thank you for your help
Reply With Quote
  #4 (permalink)  
Old 03-10-10, 11:12
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
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:

Writing Console Applications In Vb 6? - VB6 | Dream.In.Code

This approach looks interesting to. I didn't download the code but I would assume it's an implementation of the LINK.EXE method mentioned in the above url:
http://www.nirsoft.net/vb/console_ap...ual_basic.html
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #5 (permalink)  
Old 03-10-10, 11:32
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
I would also suggest that, if this is a new, commercial development, you consider .NET. I just found this now re. VB6:
Product Family Life Cycle Guidelines for Visual Basic 6.0
I can barely remember programming in VB6 myself now.
Reply With Quote
  #6 (permalink)  
Old 03-10-10, 13:58
kato01 kato01 is offline
Registered User
 
Join Date: Nov 2004
Posts: 17
Thumbs up thanks all

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.

Thank you all for the help.
Reply With Quote
  #7 (permalink)  
Old 03-10-10, 15:25
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
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.
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #8 (permalink)  
Old 03-30-10, 19:32
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,797
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...
__________________
Lou
使大吃一惊
"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

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On