Results 1 to 3 of 3

Thread: [RESOLVED] Launching VB app with argument/switch/parameter

  1. #1

    Thread Starter
    Hyperactive Member Krass's Avatar
    Join Date
    Aug 2000
    Location
    Montreal
    Posts
    489

    Resolved [RESOLVED] Launching VB app with argument/switch/parameter

    I have a VB app named App.exe

    I will use a batch file to launch it and want to use an argument. Ex.:

    c:\App.exe 1

    My VB app will then catch the "1" on the Form Load and act how I need it to.

    How could I do this? How am I trapping the "1" (or whatever parameter passed to it) when loading the vb app?

    (I'm doing this because it'll avoid me to compile the application 7-8 times every 2 days - my app is verrrry long to compile because of many very-massive "SELECT CASE" - these can't be taken out)

    Thanks
    Chris

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Launching VB app with argument/switch/parameter

    You can use the Command function (which returns the text from the command line as a string), eg:
    Code:
    Msgbox Command

  3. #3

    Thread Starter
    Hyperactive Member Krass's Avatar
    Join Date
    Aug 2000
    Location
    Montreal
    Posts
    489

    Re: Launching VB app with argument/switch/parameter

    Perfect. Thanks.
    Chris

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