得到窗口句柄后把窗口关了或者移动C#

来源:百度知道 编辑:UC知道 时间:2024/05/23 17:10:41
怎么写

http://www.zu14.cn/2008/11/15/auto_qq_msg/

http://www.zu14.cn/2008/10/28/csharp_api_sendkeys/

引用f1
f1.Dispose()或者f1.Close()其中好像有一个有点问题
移动: f1.Location=new Point(..)设置左上角位置
f1.Width=100,f1.Height=200设置宽高
或者Left,Right,Top,Bottom分别设置左,右,上,下

...以为句柄就是引用....错了,不好意思

移动的
[DllImport("user32.dll", EntryPoint = "SendMessage")]
public static extern int SendMessage(int hWnd, int wMsg,int wParam, int IParam);
[DllImport("user32.dll", EntryPoint = "ReleaseCapture")]
public static extern int ReleaseCapture();
public const int WM_SysCommand = 0x0112;
public const int SC_MOVE = 0xF012;

public static void MoveForm(int pr)

ReleaseCapture();