Re: how to open an application through an assigned filetype?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Morten Wennevik (MortenWennevik_at_hotmail.com)
Date: 05/04/04


Date: Tue, 04 May 2004 09:37:42 +0200

Hi Jesper,

Not sure how to assign file type, but what happens when you click on a
"known" file is that the program is launched with the name of the file as
the first argument in the argument list.

public static void Main(string[] args)
{
        if(args.Length > 0)
                Application.Run(new Form1(args[0]));
        else
                Application.Run(new Form1());
}

Happy coding!
Morten Wennevik [C# MVP]



Relevant Pages