Results 1 to 3 of 3

Thread: Command Line Parms with VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    8

    Command Line Parms with VB

    How do I create a VB main sub that will recognize calling parms?
    Example, I create an EXE type that I associate with a VB program and when I click on it, the VB program opens.

    Though it opens, I still need to be able to get the name of the file that caused it to open.

    Any suggestions?

    Thanks, Lance
    Last edited by LanceSummers; Feb 10th, 2005 at 04:20 AM. Reason: Resolved

  2. #2
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176

    Re: Command Line Parms with VB

    in the start function e.g sub main we get a string called Command$. We use this value to work out passed parameters such as the filename

    VB Code:
    1. Private Sub Form_load
    2.  
    3.    msgbox command$
    4.  
    5. end sub
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    8

    Re: Command Line Parms with VB

    Thanks Bod!!!

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