Results 1 to 4 of 4

Thread: %1 in visual basic

  1. #1
    yavital
    Guest

    Lightbulb %1 in visual basic

    Hello !

    I have a batch file called 1.bat and it looks like this:

    echo "c:\test.exe" %1 > c:\test.bat

    I have configured windows to open html links with 1.bat.

    After you press the html link the test.bat file looks like this:

    "c:\test.exe" "the html link you pressed"

    Is there any way in visual basic to do the same thing ?


    (a function in vb that will do what the "%1" does in dos ?)

    thanks alot!

  2. #2
    Addicted Member
    Join Date
    Jun 2001
    Posts
    183
    Command() contains the entire parameter string in VB.

    'Show it!
    MsgBox Command()

  3. #3

  4. #4
    Fanatic Member ExcalibursZone's Avatar
    Join Date
    Feb 2000
    Location
    Western NY State
    Posts
    908
    Command$ is also another way to access it.
    Code:
    Private Sub Form_Load()
        MsgBox Command$
    End Sub
    -Excalibur

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