---------------------------------------------------------------------
代码已移至:
http://www.cnblogs.com/kongfl888/p/3351733.html
--------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace War3Screen
{
/// <summary>
/// 以嵌入到窗体的方式打开外部exe--kongfl888 2013
/// </summary>
class OpenExeClass
{
static Process process = null;
static IntPtr appWin;
private static string exeName = "";
[DllImport("user32.dll", SetLastError = true)]
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true)]
private static extern long SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
[DllImport("user32.dll", SetLastError = true)]
private static extern bool MoveWindow(IntPtr hwnd, int x, int y, int cx, int cy, bool