Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2004
    Posts
    17

    Unanswered: 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

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    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? ***

  3. #3
    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

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    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? ***

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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.

  6. #6
    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.

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    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? ***

  8. #8
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •