Results 1 to 5 of 5

Thread: Command Line Arguments

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    London, UK
    Posts
    6

    Angry

    In the same way that (when writing) you can forget how to spell the simplest of words...

    I've completely forgotten how to retrieve command line arguments passed when the application is started. So, if myapp.exe is executed like this...

    c:\myapp\myapp.exe /hello

    ...how on earth do I retrieve the "/hello" bit in code?

    This is easy - I've done it before! I've just completely forgotten how!

    Yours,

    Matt


  2. #2
    Guest
    Use the Command keyword.
    Code:
    Private Sub Form_Load()
        MsgBox Command$
    End Sub

  3. #3
    Guest
    Dim CommandLine as String
    Dim SubC1 as Integer

    CommandLine = Command$
    'Get command line.

    SubC1 = InStr(1, CommandLine, "/hello", vbTextCompare)
    If SubC1 <> 0 Then
    'commandline contains /hello
    'do the rest of your stuff
    End If

    hope it helps,
    larryn


  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    London, UK
    Posts
    6

    Talking

    Fabulous - cheers chaps.

    (/rolls eyes not believing his own stupidity)

  5. #5
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    here's a website with it.
    it even has the html names there


    http://www.bbsinc.com/iso8859.html
    ______________

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