G
g_feng
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.FormCreate(Sender: TObject);<br>begin<br> Application.OnMessage := AppMessage;<br>end;<br>procedure TForm1.AppMessage(var msg:TMsg;var handled:Boolean);<br>var xpos: integer;<br> ypos: integer;<br> MousePos: TPoint;<br>begin<br> if (Msg.message = WM_MouseMove) then<br> begin<br> MousePos.X := LOWORD(msg.lParam);<br> Mousepos.Y := HIWORD(msg.lParam);<br> windows.ClientToScreen(msg.hwnd,MousePos);<br> Label1.Caption := inttostr(MousePos.X);<br> label2.Caption := inttostr(Mousepos.Y);<br> end;<br>end;<br>以上程序为得不到鼠标的屏幕坐标?