W whitelion Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-06 #1 做一个form,当鼠标在其上移动时,显示hint,hint的内容为鼠标的坐标,并且在鼠标移动过程中hint的内容动态改变,hint不消失。
P Pan Ying Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-06 #2 在application.onhint事件中响应就可以了。
W whitelion Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-06 #3 to Pan Ying; 我是新手,能不能给段代码,谢谢
卷 卷起千堆雪tyn Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-06 #4 procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin Form1.ShowHint :=True; Form1.Hint :=IntToStr(x)+','+IntToStr; end;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin Form1.ShowHint :=True; Form1.Hint :=IntToStr(x)+','+IntToStr; end;
E eyes4 Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-06 #5 在form的onmousemove事件中加入以下代码: var cursorpos:Tpoint; begin form1.hint:='example'; getcursorpos(cursorpos); application.activatehint(cursorpos); end; 为了延长hint显示的时间,可加入以下代码: Application.HintHidePause:=99999999;
在form的onmousemove事件中加入以下代码: var cursorpos:Tpoint; begin form1.hint:='example'; getcursorpos(cursorpos); application.activatehint(cursorpos); end; 为了延长hint显示的时间,可加入以下代码: Application.HintHidePause:=99999999;
卷 卷起千堆雪tyn Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-06 #6 补充 : procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var cursorpos:Tpoint; begin Form1.ShowHint :=True; getcursorpos(cursorpos); application.activatehint(cursorpos); Form1.Hint :=IntToStr(x)+','+IntToStr; end;
补充 : procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var cursorpos:Tpoint; begin Form1.ShowHint :=True; getcursorpos(cursorpos); application.activatehint(cursorpos); Form1.Hint :=IntToStr(x)+','+IntToStr; end;