一个C++写的窗口Form,能否在.net中调用,并嵌入.net的MDI?

解决方案 »

  1.   

    或者其他的解决方案,但效果要求是:主程式C#写的,功能程式是C++写的,点主程式的菜单,调用C++的exe或dll,运行效果就像MDI那样就行了
      

  2.   

    #1,如果是ActiveX控件,可行
    #2,可考虑C++/CLI(推荐)或PInvoke,与native C++ 交互
      

  3.   


            private void openProc(string strPath)
            {
                ProcessStartInfo psi = new ProcessStartInfo(strPath);
                Process p = new Process();
                p.StartInfo = psi;
                p.Start(); 
            }              openProc(Application.StartupPath + "\\My.exe");不知道这个是否满足你的要求
      

  4.   


            private void openProc(string strPath)
            {
                ProcessStartInfo psi = new ProcessStartInfo(strPath);
                Process p = new Process();
                p.StartInfo = psi;
                p.Start(); 
            }//strPath写入你的exe执行路径
    openProc(Application.StartupPath + "\\my.exe");
      

  5.   

    openProc(Application.StartupPath + "\\My.exe");
    这个只能实现C#调用C++的exe,我还要求将exe窗口嵌入到C#的主程序中,作为其一个MDIChild
      

  6.   

    flyerwing
    =========================能不能给个例子呀?例如C#调用notepad.exe, 将弹出的notepad窗体嵌入C#的Form