这里的调用不仅指启动运行某程序,而且可以模拟操作,并读取其操作内容(请不要给调用windows自带软件的例子,如notepad.exe或cmd.exe之类的)。请专家给个思路,或者能提供些相关参考资料,谢谢。

解决方案 »

  1.   

    嵌外部程序
    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);}
      

  2.   

    以下的例子可以实现C#控制千千静听的播放,停止,上一首,下一首等操作,希望楼主可以获得突破口.http://download.csdn.net/source/2273525
      

  3.   

    感谢nofc2006,就冲着是个负责的回答,给分。