用我的程序双击打开文件 [英] Open file with double click with my program

查看:76
本文介绍了用我的程序双击打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个vb.net程序来浏览.apk文件并安装在模拟器上, 现在我想使其成为打开.apk文件的默认程序

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

感谢您的时间:)

推荐答案

整个双击打开"部分是由Windows完成的,而不是由您的程序完成的.如果双击文件,Windows会检查注册表中有关该程序的设置.您需要设置这些设置,以便您的程序是数据类型的默认程序. 尝试使用Google file association windows.

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.

这篇关于用我的程序双击打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆