That because Explorer only launches your application with one file at a time. Your code is expecting this:
MyApp.exe file1.txt file2.txt file3.txt file4.txt
Explorer is actually launching this:
MyApp.exe file1.txt
MyApp.exe file2.txt
MyApp.exe file3.txt
MyApp.exe file4.txt
Google for "Single instance application c#" for examples on how to deal with this situation and pass the filename from one instance of your app to another.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008