魔 魔鬼大师 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-26 #23 procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;<br> Shift: TShiftState; X, Y: Integer);<br>begin<br> if Button=left begin<br> ShowMessage('left btn press');<br> end;<br>end;
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;<br> Shift: TShiftState; X, Y: Integer);<br>begin<br> if Button=left begin<br> ShowMessage('left btn press');<br> end;<br>end;
魔 魔鬼大师 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-26 #25 rRect := Form.Rect;<br> if (X > rRect.Left) and (X < rRect.Right)<br> and (Y > rRect.Top) and ( Y < rRect.Bottom) then<br> begin<br> ShowMessage('Ok');<br> end;
rRect := Form.Rect;<br> if (X > rRect.Left) and (X < rRect.Right)<br> and (Y > rRect.Top) and ( Y < rRect.Bottom) then<br> begin<br> ShowMessage('Ok');<br> end;
魔 魔鬼大师 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-26 #27 那还不简单:<br> if Msg.message = WM_LBUTTONDOWN then<br> if (X > rRect.Left) and (X < rRect.Right)<br> and (Y > rRect.Top) and ( Y < rRect.Bottom) then<br> begin<br> showmessage('left btn pressed')<br> end;
那还不简单:<br> if Msg.message = WM_LBUTTONDOWN then<br> if (X > rRect.Left) and (X < rRect.Right)<br> and (Y > rRect.Top) and ( Y < rRect.Bottom) then<br> begin<br> showmessage('left btn pressed')<br> end;
魔 魔鬼大师 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-26 #30 rRect := btn5.Rect;<br> if (X > rRect.Left) and (X < rRect.Right)<br> and (Y > rRect.Top) and ( Y < rRect.Bottom) then<br> begin<br> ShowMessage('Ok');<br> end;
rRect := btn5.Rect;<br> if (X > rRect.Left) and (X < rRect.Right)<br> and (Y > rRect.Top) and ( Y < rRect.Bottom) then<br> begin<br> ShowMessage('Ok');<br> end;
魔 魔鬼大师 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-26 #31 rRect := btn5.BoundRect;<br> if (X > rRect.Left) and (X < rRect.Right)<br> and (Y > rRect.Top) and ( Y < rRect.Bottom) then<br> begin<br> ShowMessage('Ok');<br> end;
rRect := btn5.BoundRect;<br> if (X > rRect.Left) and (X < rRect.Right)<br> and (Y > rRect.Top) and ( Y < rRect.Bottom) then<br> begin<br> ShowMessage('Ok');<br> end;
魔 魔鬼大师 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-26 #35 if Button=mbleft then<br>if (X >96) and (X < 128)<br> and (Y > 122) and ( Y < 145) then<br> begin<br> ShowMessage('Ok');<br> end;
if Button=mbleft then<br>if (X >96) and (X < 128)<br> and (Y > 122) and ( Y < 145) then<br> begin<br> ShowMessage('Ok');<br> end;
魔 魔鬼大师 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-26 #37 我哪有什么DPR,我又不做你这个东东,<br>你意思可能没表达清楚
夫 夫罗多 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-26 #39 我是想要一个 完整的 监视鼠标在计算器上"5"的位置按下左键 的程序代码 只要在5的位置按下左键就ShowMessage()<br><br><br>大哥 你这下明白了吗?
我是想要一个 完整的 监视鼠标在计算器上"5"的位置按下左键 的程序代码 只要在5的位置按下左键就ShowMessage()<br><br><br>大哥 你这下明白了吗?
T tianlove Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-26 #40 已经很清楚了吧。<br>if (X >96) and (X < 128)<br> and (Y > 122) and ( Y < 145) then<br>以上来确定有效范围,再<br>if Button = mbLeft then<br> ShowMessage('Left');<br> if Button = mbRight then<br> ShowMessage('Right');<br>判断是左键还是右键
已经很清楚了吧。<br>if (X >96) and (X < 128)<br> and (Y > 122) and ( Y < 145) then<br>以上来确定有效范围,再<br>if Button = mbLeft then<br> ShowMessage('Left');<br> if Button = mbRight then<br> ShowMessage('Right');<br>判断是左键还是右键