just some suggestions:wait until plugsForm.exe is up, use FindWindow API to find the window handle for plugsForm.exe, then use SendMessage to send it a WM_SIZE message
just some suggestions:wait until plugsForm.exe is up, use FindWindow API to find the window handle for plugsForm.exe, then use MoveWindow API to resize the form
just some suggestions:wait until plugsForm.exe is up, use FindWindow API to find the window handle for plugsForm.exe, then use MoveWindow API to resize the form
然後用WM_SIZING 其中wParam =0 lParam指向一個RECT結構
private static extern int FindWindow(string _ClassName, string _WindowName);[DllImport("user32.dll", EntryPoint = "MoveWindow")]
static extern bool MoveWindow(int hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);//调用:
System.Diagnostics.Process.Start("notepad.exe");
int iWin = FindWindow("notepad", null);
MoveWindow(iWin, 0, 0, 100, 200, true);
可是我测试的时候没有成功呀?
是不是你的代码有什么注意的地方
using System.Runtime.InteropServices;
MoveWindow(int hWnd
MoveWindow(IntPtr hWnd
估計是筆誤