I have an app and I have a file type associated with it. When I doubleclick the file it opens my app but the filename/path never gets passed to my app. It does work if I drag the file over the icon, however. Here is the main():
static void Main(string[] filenames)
{
Form1 form = null;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
form = new Form1();
if (filenames != null && filenames.Length > 0)
form.FileName = filenames[0];
Application.Run(form);
}
filenames.length comes up 0 every time (unless I drag/drop the file onto the app)