CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Location
    India, West Bengal
    Posts
    36

    command line parameter in VB

    I want to execute a VB app and pass parameters to it. How do I do this in VB ?
    How is a parameterised app created in VB ?

    What I want to do is -
    >> start application.exe param1, param2

    from the dos shell.

    Thanx in advance



  2. #2
    Join Date
    Jul 1999
    Location
    Athens, Hellas
    Posts
    769

    Re: command line parameter in VB


    dim str as string

    Form_Load()
    str=Command
    end sub


    Command1_Click()
    Select case Trim(str)
    case is ""
    'do nothing
    case is "1"
    'do something
    case is "2"
    'do something else
    end select
    end sub



    If you add a command button on your form, you can there check which action will be taken regarding to the command parameter that was passed...
    I made the check on the pressing of the button, you can do it whenever you need or even on the load event of your form....

    Michael Vlastos
    Automation Engineer
    Company SouthGate Hellas SA
    Development Department
    Athens, Greece

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