Click to See Complete Forum and Search --> : Recieving a File Name from windows


November 19th, 1999, 07:31 AM
When you open a file from my computer or windows explorer the associated program starts and loads the file. How do you set up a visual basic application to handle this. I can associate my program with file types so that my application will start up when they are opened, but I don't know how to recieve the string of the filename so that I can do something with it. How do you handle this process?

Aaron Young
November 19th, 1999, 11:46 AM
Take a look at the Command Function, it returns a string containing the commandLine Passed to your application, if any, eg.

private Form_Load()
If len(Command) then MsgBox "You Entered the Following Command Line:" & vbCrLf & Command
End Sub




Aaron Young
Analyst Programmer
adyoung@win.bright.net
aarony@redwingsoftware.com

November 20th, 1999, 08:41 PM
Excellent! Thank you very much Aaron!