【转】C# 调用开始窗口
using System.Runtime.InteropServices;
[DllImport("Shell32.dll", EntryPoint = "#61", CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool SHRunFileDialog(IntPtr hWnd,
IntPtr hIcon,
[MarshalAs(UnmanagedType.LPStr)]string directory,
[MarshalAs(UnmanagedType.LPTStr)] string title,
[MarshalAs(UnmanagedType.LPTStr)] string prompt,
UInt32 uFlags);
private void button1_Click(object sender, EventArgs e)
{
SHRunFileDialog(this.Handle, this.Icon.Handle, Environment.CurrentDirectory, "运行", "输入文件名,windows将运行响应的程序", 0);
}
编辑器加载中...