Here is my Program Main:
static void Main(string[] args)
{
for (int r = 0; r <= args.Length ; r++ )
{
MessageBox.Show(args[r]);
}
if (args != null && args.Length > 0)
{
string filename = args[0];
if (File.Exists(filename))
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Location_Alert MainForm = new Location_Alert();
MainForm.ImportFile(filename);
Application.Run(MainForm);
}
}
else
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Location_Alert());
}
the problem is, when I launch the *.enot file that is associated with the program, the program launches, but the arguments don't seem to be setting, as args is empty.
Is there some trick to this specific to ClickOnce that I am missing?