Visual Basic Development Bookmark and Share   
 Home > Visual Basic Language > How to pass the file name ( a la curdir function) in vb6 applications
 

How to pass the file name ( a la curdir function) in vb6 applications

Suppose I save a file as *.tar (this extension is my own making) using avb6program. Nowwhen the user clicks this file, the window asks 'with what program to open this file' and he/she selects the exe of my program. Now I want to pass the name of file clicked to my program. Like when we click *.xls file, the exe of Excel program knows which file has been opened or clicked. Is there a way? Please help.

vb6crazy  Saturday, November 28, 2009 4:23 AM
Yes its possible. You have to add an entry to registry. Following link contains code to do the same

http://www.codeproject.com/KB/vb/VBFileAssociation.aspx
Gaurav Khanna
Khanna Gaurav  Saturday, November 28, 2009 8:09 AM
thanks in advance, i will try.
vb6crazy  Sunday, November 29, 2009 12:44 AM
I explored this article, but as far as i could collect, it belongs to vb.net. can you please suggest a similar link for vb6
vb6crazy  Sunday, November 29, 2009 12:56 AM
Hi gaurav,

I tried to manipulate your link using this as search parameters and stumbled upon a link which solved whole of my problem, the solutions is: function command$ which passes the file path to the program which i can use further in my application. Thanks very much for your valuable suggestion.
vb6crazy  Sunday, November 29, 2009 1:31 AM
In future try this link if you are using VB6 For Visual Basic 6 questions, please read...5 votes
coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
Please format the code in your posts with the button . Makes it easier to read .
bdbodger  Sunday, November 29, 2009 2:30 AM

You can use google to search for other answers

Custom Search

More Threads

• Communicating with IBM Personal COmmunications
• copy file using specific credentials
• How to open COM Port No. greater than 10
• Getting web page source
• get cursor text line
• Array Creation
• Do Loop
• Sendkeys to cmd
• URGENT VB 2008: How do you save a webpage displayed in webbrowser1 using savefiledialogbox
• Cannot Save Registry Key