wpf 加载exe程序,嵌入exe程序,隐藏标题等

关键代码

 IntPtr notepadHandle =APPIntprt= _process.MainWindowHandle;
            int style = GetWindowLong(notepadHandle, GWL_STYLE);
            style = style & ~((int)WS_CAPTION) & ~((int)WS_THICKFRAME); // Removes Caption bar and the sizing border
            style |= ((int)WS_CHILD); // Must be a child window to be hosted

            SetWindowLong(notepadHandle, GWL_STYLE, style);
            SetParent(notepadHandle, this.Handle);

效果图(嵌入记事本进程exe):

 源码下载:

https://files.cnblogs.com/files/chlm/wpf_load_exe.rar

原文地址:https://www.cnblogs.com/congqiandehoulai/p/12726279.html