Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to start up and load a datafile by double clicking? 1

Status
Not open for further replies.

IgnaceD

Technical User
Apr 1, 2004
6
NL
Hi,

how can I make my Visual Basic 6 program to start up and load a data file by double-clicking that data file in WIndows Explorer?
Just like you double-click a text file and Notepad is started and loads that text file.

thanks in advance.

 
You will have to associate that extension with your application. You do this through windows.

If that extension is not already associated with a program you can just double click that file and then choose your program. Otherwise you'll have to go through Explorer to do that. Or, if your're running Xp then you can right click and choose Open With...

Before your program will open that file, you will need to setup your program to process the Command arguments. The path of the file the user double-clicks on will be sent as a command line argument to your program. You will need to process this and do whatever in your application to open the file. You can do a search on this forum for Command and get many results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top