[DllImport("coredll.Dll")] publicstaticextern IntPtr FindWindow(string strclassName, string strWindowName); [DllImport("coredll.Dll")] publicstaticexternint SetWindowPos(IntPtr hwnd, int hWndInsertAfter, int x, int y, int cx, int cy, int wFlags); [DllImport("coredll.Dll")] publicstaticexternbool PostMessage(IntPtr hwnd, int Msg, int wParam, int lParam); [DllImport("coredll.Dll")] publicstaticexternint SetWindowPos(IntPtr hwnd, int hWndInsertAfter, int x, int y, int cx, int cy, int wFlags); [DllImport("coredll.Dll")] publicstaticexternbool ShowWindow(IntPtr hWnd, Int32 nCmdShow); publicconstint WM_CLOSE =0x10; [DllImport("coredll.Dll")] publicstaticexternint SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); [DllImport("coredll.Dll", EntryPoint ="CreateProcess", SetLastError =true)] externstaticint CreateProcess(string strImageName, string strCmdLine, IntPtr pProcessAttributes, IntPtr pThreadAttributes, int bInheritsHandle, int dwCreationFlags, IntPtr pEnvironment, IntPtr pCurrentDir, IntPtr bArray, ProcessInfo oProc); publicclass ProcessInfo ......{ public Int32 hProcess; public Int32 hThread; public Int32 ProcessID; public Int32 ThreadID; } [DllImport("coredll.Dll")] publicstaticexternbool MoveWindow(IntPtr hWnd, int x, int y, int nWidth, int nHeight, bool bRePaint); publicconstint WM_CLOSE =0x10;