Pergunta

I have OpenFileFialog realized in my Windows Forms application, but when I use Open With in file context menu, or add my item in context menu with command like "myapp.exe %1" it just opens application. Need I to do anything else to realize it?

Foi útil?

Solução

This does nothing more than pass a filename as the first argument to your program. Just having an OpenFileDialog is completely irrelevant to that. You need to examine command-line arguments at startup and decide that you might want to open a file if one is given.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top