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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

associate extension with app

Status
Not open for further replies.

joecoolish

Programmer
Jan 26, 2005
8
0
0
US
k, so i was wondering how you associate a custom extension (in my case, f22) with an application? and (more importantly) when that file is double clicked, or choosen with "Open With" how do you open that file automatically? I have the file->open menu all working, but when i do an open with, it just runs the application and doesn't load the file. any help would be great!
 
It sounds like you have the file association set in windows explorer, and that you just need to get your application to accept the command-line argument. Correct?

If so, your [tt]Main[/tt] method should be accepting an array of strings as an argument. It should be one of the two forms, depending on whether you want to return a value from it.
MSDN said:
static int Main(string[] args)
static void Main(string[] args)

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top