procedure TfmLook.Timer1Timer(Sender: TObject);
var
pPoint:TPoint;
hWnd:Integer;
begin
GetCursorPos(pPoint);
hWnd:=WindowFromPoint(pPoint);
SendMessage(hwnd,WM_MOVE,30,30);
end;为什么sendmessage不起作用啊?
var
pPoint:TPoint;
hWnd:Integer;
begin
GetCursorPos(pPoint);
hWnd:=WindowFromPoint(pPoint);
SendMessage(hwnd,WM_MOVE,30,30);
end;为什么sendmessage不起作用啊?
再去处理你的动作才对
const SC_DRAGMOVE:longint=$f012;
ReleaseCapture;
sendmessage(form1.Handle,wm_syscommand, SC_DRAGMOVE, 0);
begin
MoveWindow(handle,10,10,height,width,true);
end;
直接使用API函数原型:BOOL MoveWindow(HWND hWnd.int x.int y,int nWidth,int nHeight,BOOL BRePaint);
begin
MoveWindow(handle,10,10,height,width,true);
end; ok,谢谢!