Doubleclick a file in Windows Explorer, start my program opening that file 
Author Message
 Doubleclick a file in Windows Explorer, start my program opening that file

Quote:
> In Windows Explorer I can associate my program (developed using Visual Basic
> 5.0 Pro in Windows95) with a file suffix.

> When I doubleclick a file with that suffix my program starts allright, but how
> can I catch the path och file name of the doubleclicked file??

Any command parameters given to your program can be accessed using VB's
"Command" function - look it up in the help.

In order for this to work, your file association data should have a "%1" after
the EXE name, eg:

C:\PROGRA~1\MYAPP\THING.EXE "%1"

The filename (and path) clicked on will be returned in %1, which can be read
using the "Command" function.

Alex Warren

http://www.*-*-*.com/ ;         - Axe Software: freeware for DOS & Windows
http://www.*-*-*.com/ ;- Basix Fanzine: magazine for BASIC programmers
http://www.*-*-*.com/ ~perditionproductions           - mods (IT format)
-----------------------------------------------------------------------------
(please reply to the newsgroup - if you must reply by email, change the anti-
spam rubbish to the email address above)



Fri, 09 Mar 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Opening files from windows explorer ????

2. Open file by clicking in windows explorer

3. Open .ini file on program start

4. Help with auto open of file when VB program starts

5. How to react to files associated with my program, when they are started by doubleclicking them in Explorer

6. _how to open a file with associated windows program from within VB

7. Direct Printing a file in windows 3.1 (16-bit) app without opening the file

8. How do I print a file in windows 3.1(16-bit) without OPENING the file

9. How do I print a file in windows 3.1(16-bit) without OPENING the file

10. How do i get my program to open a file when I click on a file

11. Start program automatically when Windows starts

12. Making program start when windows starts...

 

 
Powered by phpBB® Forum Software