add "string[] args" to your Main method
will tell you like what the filepath to the file that was opened is, or if you open the program from command prompt it will tell you the parameters the user used.
and it would show the path of a file if you dragged it onto your program
static void Main(string[] args)
{
Application.Run(new Form1());
}