Delphi controls the mouse to the control area

xiaoxiao2021-03-06  75

Procedure MoveMouseInTrol (AWINCONTROL: TCONTROL);

VAR

RTControl: TRECT;

Begin

RtControl: = awInControl.BoundSRect;

MapwindowPoints (Awincontrol.Parent.Handle, 0, RTControl, 2);

SetCursorpos (RTControl.right - RTControl.right - RTControl.Left) Div 2,

RTControl.top (RTControl.bottom - RTControl.top) Div 2);

END;

转载请注明原文地址:https://www.9cbs.com/read-120916.html

New Post(0)