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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.