dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Passing arguments in vb6.0 ?

  1. #1
    Join Date
    Sep 2007
    Posts
    345

    Passing arguments in vb6.0 ?

    Assuming I have truyen.exe file, I want to give notice to truyen.exe file to output the message with the syntax: Drive:\truyen.exe "example communication", I want to pass the file to truyen.exe. how to declare exe yourself?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,172

    Re: Passing arguments in vb6.0 ?

    You need to compile the app so it can process command line parameters.

    Try searching google for "command line parameters vb6".

  3. #3
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,330

    Re: Passing arguments in vb6.0 ?

    You would need to add code to your truyen project to process the command line parameters. When a VB program is started the var Command$ will contain any command line parameters that were passed from the command line. Your code will need to look at that var and take whatever action on it that you want it to do such as open a file and place it in a text box or whatever the case may be.
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)