VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Reading Command Parameters

Jonathan Jarvis  (2 Submissions)   Files/File Controls/Input/Output   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

Have you ever wanted to click a file and open it? If your program is associated with a specified file type, or you select file(s) and drag them onto the exe icon of your app then this code is for you. It reads the parameters when the form is loaded using by getting the "Command".
This code can get each file dragged or clicked on. If you just use the command statement you will get something like this "c:\george.bmp c:\ben.bmp f:\mydoc.doc". This code seperates each file and uses another sub to open it.

Inputs
If you want to use this code so far you will need a listbox with a name of "List1"

Assumes
This uses some some simple string work and a loop statement.

Returns
THis code returns seperated command parameters

Side Effects
None as of yet

Rate Reading Command Parameters (4(4 Vote))
Reading Command Parameters.bas

Reading Command Parameters Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters