这里的调用不仅指启动运行某程序,而且可以模拟操作,并读取其操作内容(请不要给调用windows自带软件的例子,如notepad.exe或cmd.exe之类的)。请专家给个思路,或者能提供些相关参考资料,谢谢。
解决方案 »
- 关于Ascii码
- c# 计算器复制和粘贴功能的问题
- 我做多线程断点续传文件,当大文件时,每一块数据内容都需要读打开文件读取后再关闭,收取的地方也一样
- DataGridView中对可输入项的格式实时校验
- 我要实现简单的导出word文件的功能,请问如何判断客户端的word是9.0还是10.0?
- c# 如何读取可以用文本打开的文件
- C#.NET 两个页面复杂的变量传递问题(a.aspx通过request接收变量c用sesssion传给b.aspx;b.aspx根据c处理数据库中的信息形成图片(有热区的
- 求有关积分和求导等方面的函数
- UtilityLibrary,你会用吗?(回帖即有分!!!)
- 我这里的有vs7.0正式版
- c#获取登陆用户名
- 关于捕捉USB摄像头突然断开的消息,又如何捕获在其重插后的消息?
DllImport("User32.dll ", EntryPoint = "SetParent")]
private static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
[DllImport("user32.dll ", EntryPoint = "ShowWindow")]
public static extern int ShowWindow(IntPtr hwnd, int nCmdShow);
private void button1_Click(object sender, EventArgs e)
{
Process p = new Process();
p.StartInfo.FileName = "cmd.exe ";
p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Minimized; p.Start();
System.Threading.Thread.Sleep(100);
SetParent(p.MainWindowHandle, this.Handle);
ShowWindow(p.MainWindowHandle, 3);}