문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top