Results 1 to 3 of 3

Thread: Reading the command line in VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2009
    Posts
    13

    Reading the command line in VB6

    It seems to me that many years ago, I wrote a VB6 program that would read the command line when it ran and process the data (like a folder name or something).

    Unfortunately, I am old now and have forgotten how to do this (or maybe forgotten that I actually did it.)

    Is there an easy way to do this?

    Strangely enough, I can still remember how to do it in Atari 8 basic (which was a chore) but not in VB6.

    Help?

  2. #2
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    6,177

    Re: Reading the command line in VB6

    Try using Command$ to get command line parameters. If you need to split this into several parameters there is an OS provided CommandLineToArgvW API which is used by dir, curl, ping, etc. command line utilities i.e. it provides the canonical way to split utility/application parameters. Here is a sample VB6 code which uses it.

    cheers,
    </wqw>

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2009
    Posts
    13

    Re: Reading the command line in VB6

    Thank you for jogging my limited memory!!

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