Delphi如何在控件上获取光标位置?
发布时间:2020-12-15 09:44:29 所属栏目:大数据 来源:网络整理
导读:我想知道光标在TCustomControl上的位置. 解决方法 您可以使用MouseMove事件: procedure TCustomControl.MouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer);begin Label1.Caption := IntToStr(x) + ' ' + IntToStr(y); end;
我想知道光标在TCustomControl上的位置.
解决方法
您可以使用MouseMove事件:
procedure TCustomControl.MouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer); begin Label1.Caption := IntToStr(x) + ' ' + IntToStr(y); end; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |