Open file with double click with my program [close

2019-09-27 01:46发布

I programmed a vb.net program to browse .apk file and install in on emulator , now i want to make it a default program to open .apk files

problems : - how to make program that can open a file ! - how to get opened file path

thanks for your time :)

标签: vb.net file
1条回答
叛逆
2楼-- · 2019-09-27 02:11

The whole "Double-Click to Open" part is done by Windows, not by your program. If you double-click a file Windows checks the registry for settings on what to do with the program. You need to set these settings so that your program is the default program for the datatype. Try google file association windows.

The filename of the file that was double-clicked is passed to the program through a command line parameter. You can access these through

My.Application.CommandLineArgs

Use this to then open the file in your program.

查看更多
登录 后发表回答