VB2010 WINDOWS文件协会 [英] VB2010 WINDOWS FILES ASSOCIATION

查看:52
本文介绍了VB2010 WINDOWS文件协会的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从VB2010程序中使用Windows文件关联性打开"关联的文档文件?例如,作为我的程序数据集的一部分,我有一个该程序使用的excel工作簿表格.我已经知道如何从程序中启动Excel.我想要做的是让Windows启动适当的应用程序并加载文件,类似于您从Windows资源管理器或桌面双击文件时发生的情况.通常,此数据集可能包含Word文档,Excel工作簿,pdf文件等...

From within VB2010 program, how do you "open" an associated document file using Windows file associativity? For example, as part of my programs data set, I have an excel workbook form that the program uses. I already know how to start Excel from withing the program. What I want to be able to do is let windows start the appropriate application program and load the file, simialr to what happens when you double click a file from Windows Explorer or on the desktop. In general, this data set could have Word docs, Excel workbooks, pdf files, etc...

推荐答案

Process.Start(filename)将使用以下文件打开文件:关联程序.
Process.Start(filename) will open the file with the associated program.


这篇关于VB2010 WINDOWS文件协会的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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