CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 1999
    Posts
    21

    Command line options w/ VB program

    Does anyone know how to make it so you can add command line options to a VB Program.. Like If I want a feature disabled by default but I can enable it if I Run the program with a switch or something.. Like Notepad -Y ... or someting to that effect..

    Thanks


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Command line options w/ VB program

    in your VB program check the Command$ variable. It is a global variable that contains the command line arguments of your program.


  3. #3
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Command line options w/ VB program

    There's some handy code at :

    http://codeguru.developer.com/vb/articles/1755.shtml that split your command line parameters (from Command$ as Lothar stated) into an array for you - you can simply drop it into your program.


    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured