06 2013 档案

摘要:示例代码如下:SaveFileDialog sfd = new SaveFileDialog();//设置文件类型 sfd.Filter = "文本文件(*.txt)|*.txt|Word文件(*.docx)|*.docx";//设置默认文件类型显示顺序 sfd.FilterIndex = 1;//保存对话框是否记忆上次打开的目录 sfd.RestoreDirectory = true;//点了保存按钮进入 if (sfd.ShowDialog() == DialogResult.OK){ string localFilePath = sfd.FileName; //获得文 阅读全文
posted @ 2013-06-25 16:19 zpehome 阅读(405) 评论(0) 推荐(0) 编辑
摘要:调用API库:[DllImport("user32.dll", EntryPoint = "SendMessageA")]private static extern int SendMessage(IntPtr hwnd, int wMsg, int wParam, StringBuilder lParam);[DllImport("user32 ")]private static extern IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, int lParam);在函数里调 阅读全文
posted @ 2013-06-24 15:56 zpehome 阅读(783) 评论(0) 推荐(0) 编辑
摘要:很简单,一句话:System.Diagnostics.Process.Start(path);其中path是要启动程序的目录。 阅读全文
posted @ 2013-06-21 10:04 zpehome 阅读(301) 评论(0) 推荐(0) 编辑