Results 1 to 4 of 4

Thread: How to Get Command Line Parameters....

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    India, Chennai
    Posts
    121

    Exclamation How to Get Command Line Parameters....

    Hi Guys,
    Is it Possible to get command line Parameters in VB, like in C/C++. If Possible then how can we read those Parameters. I need this very urgently. thnx for ur help.
    Stop Piracy. Stop Using Microsoft.

  2. #2
    jim mcnamara
    Guest
    Command$ returns the command line. It's a single string with all of the command line paramters in it.

  3. #3
    Megatron
    Guest
    If you need to use multiple command line arguments, then you can easily use the Split() function, e.g:
    Code:
    C:\> MyProgram.exe cmd1/cmd2/cmd3
    In VB:
    Code:
    Dim sCommandLine() As String
    sCommandLine = Split(Command$)
    For I = 0 To UBound(sCommandLine)
        MsgBox sCommandLine(I)
    Next I

  4. #4
    New Member
    Join Date
    Nov 2009
    Posts
    7

    Re: How to Get Command Line Parameters....

    Nice. Really this has helped me.

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