打开我的电脑:System.Diagnostics.Process.Start("explorer.exe", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}");
打开任意目录:System.Diagnostics.Process.Start("explorer.exe",@“C:\windows”);
运行文件:System.Diagnostics.Process.Start(string fileName);
WebBrowser控件
关于openFileDialog(folderBrowseDialog)
//为图像选择一个筛选器
openFileDialog1.Filter = “所有图像文件 | *.bmp; *.pcx; *.png; *.jpg; *.gif;” +
“*.tif; *.ico; *.dxf; *.cgm; *.cdr; *.wmf; *.eps; *.emf|” +
“位图( *.bmp; *.jpg; *.png;…) | *.bmp; *.pcx; *.png; *.jpg; *.gif; *.tif; *.ico|” +
“矢量图( *.wmf; *.eps; *.emf;…) | *.dxf; *.cgm; *.cdr; *.wmf; *.eps; *.emf”;
//设置对话框标题
opnDlg.Title = “打开图像文件”;
//启动”帮助”按钮
opnDlg.ShowHelp = true;
//如果结果为“打开”,选择文件
if(opnDlg.ShowDialog() == DialogResult.OK)
{
//读取当前选中的文件名
string curFileName = opnDlg.FileName;
}
字符与整型转换
int num = Convert.ToInt32(字符串);
string str = Convert.ToString(数字);
整型变量=Int.Parse(字符串);
等等