Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
フォーム上のカーソル位置を取得する必要があります。どうすればよいですか?
に渡しMouse.CursorPosますTForm.ScreenToClient()。
Mouse.CursorPos
TForm.ScreenToClient()
Mouse.CursorPos画面座標系で返されます。TForm.ScreenToClient()ポイントをフォームのクライアント座標系に変換します。
実際、すべての TControl の子孫は、座標系を変換するScreenToClient()メソッドとその逆の を提供しています。ClientToScreen()
ScreenToClient()
ClientToScreen()