我怎么能显示出&QUOT与......打开;文件对话框? [英] How can I show the "Open with" file dialog?
本文介绍了我怎么能显示出&QUOT与......打开;文件对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有简单的方法来打开文件对话框的打开方式?
Is there any simple way to open the "Open with" file dialog?
推荐答案
一些逆向工程与ProcExp透露,工作了RUNDLL32.EXE命令行。下面是一个使用它的示例程序:
Some reverse-engineering with ProcExp revealed a rundll32.exe command line that worked. Here's a sample program that uses it:
using System;
using System.Diagnostics;
using System.IO;
class Program {
static void Main(string[] args) {
ShowOpenWithDialog(@"c:\temp\test.txt");
}
public static void ShowOpenWithDialog(string path) {
var args = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "shell32.dll");
args += ",OpenAs_RunDLL " + path;
Process.Start("rundll32.exe", args);
}
}
测试在Win7的
,我无法猜测如何,这将在Windows的其他版本。
Tested on Win7, I cannot guess how well this will work on other versions of Windows.
这篇关于我怎么能显示出&QUOT与......打开;文件对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文