Visual Basic Development Bookmark and Share   
 Home > Visual Basic Language > file associations
 

file associations

Okay I know that this is in the wrong section, but I don't really know where else to put it.
I just made a program that deals with a file type I made up. Right now it uses a Open File dialog box, but I would like to be able to use explorer file associations. I tried just opening the file with the program, but the open file box still came up. Is there any way I can skip the open file dialog box and just load the path of the file opened into a string?
Thanks
Felipe

felipet  Sunday, August 17, 2008 3:50 PM
I'm new to vb.net myself so I can't give you quite the answer you're looking for - but it should be a matter of just writing to the registry to register a list of file types associated with your application (itself a registry 'key') and maybe a set of verbs or commands to say what to a file when chosen by the user - open, edit, print - Windows (ie File Manager) should then automatically pass the verb(s) as parameters along with the filename to your application which it should run automatically. I knew how to do this legacy VB. I'll let one the VB.Net experts tell you (and me) how to do this in Vb.Net - unless you now know, having been given a clue as to what to do, know how to do it. If so, share plz
Allan
bigamee  Sunday, August 17, 2008 4:31 PM
Hi Felipe,

Allan gives the good direction. In VB.NET we also need to modify the registry and use My.Application.CommandlineArgs to read the file. You can read this article to get the detailed information about how to. Hope this helps.

Best regards,
Riquel

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Riquel_Dong  Friday, August 22, 2008 2:57 AM
I'm new to vb.net myself so I can't give you quite the answer you're looking for - but it should be a matter of just writing to the registry to register a list of file types associated with your application (itself a registry 'key') and maybe a set of verbs or commands to say what to a file when chosen by the user - open, edit, print - Windows (ie File Manager) should then automatically pass the verb(s) as parameters along with the filename to your application which it should run automatically. I knew how to do this legacy VB. I'll let one the VB.Net experts tell you (and me) how to do this in Vb.Net - unless you now know, having been given a clue as to what to do, know how to do it. If so, share plz
Allan
bigamee  Sunday, August 17, 2008 4:31 PM
Hi Felipe,

Allan gives the good direction. In VB.NET we also need to modify the registry and use My.Application.CommandlineArgs to read the file. You can read this article to get the detailed information about how to. Hope this helps.

Best regards,
Riquel

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Riquel_Dong  Friday, August 22, 2008 2:57 AM

You can use google to search for other answers

Custom Search

More Threads

• Release or Debug Problem with WriteFile API
• creating an on screen keyboard so my program can be used on touch screen computers
• TypeOF doesn't work correct for Interfaces..
• Tips on overriding/disabling some basic Windows functions?
• Visual Basic Calculator
• Writting Mathematical expressions
• Process.Start Probs
• What do the brackets around these parameters mean?
• Open Form2, wait until button is clicked, close form2 and continue with form 1
• [OTP] VB6 line concatenation