R ryg Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-19 #1 请问如何用鼠标左键点出popupmenu? (在不用其它控件的情况下,如lmd。)
C cAkk Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-19 #2 在OnClick事件里这样写: popupmenu1.Popup(x,y);
O o*o Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-19 #3 no ,cAkk procedure TMainForm.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var APos: TPoint; begin APos:= ClientToScreen(Point(x,y)); if Button = mbLeft then PopupMenu.Popup(APos.X, APos.Y); end;
no ,cAkk procedure TMainForm.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var APos: TPoint; begin APos:= ClientToScreen(Point(x,y)); if Button = mbLeft then PopupMenu.Popup(APos.X, APos.Y); end;
O o*o Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-19 #6 to cytwon: 什么都一样? ONCLICK哪来的X,Y。
C cAkk Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-19 #7 o*o: GetCursorPos就可以得到了呀! 不过,当然你写的更正规一点,我只不过是为了抢分,随手写的,相信 ryg能够看得懂原理就行了.
W W.H. Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-20 #9 procedure TForm1.Button1Click(Sender: TObject); var pt: TPoint; begin getcursorpos(pt); popupmenu1.popup(pt.x, pt.y); end; 我也来抢分.
procedure TForm1.Button1Click(Sender: TObject); var pt: TPoint; begin getcursorpos(pt); popupmenu1.popup(pt.x, pt.y); end; 我也来抢分.
3 3h Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-20 #11 在onclick过程中写的前提是不需要onClick...按钮?!
C cAkk Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-20 #13 3h: 人家可没说是"按钮"哦!可能是image,label,panel....
R ryg Unregistered / Unconfirmed GUEST, unregistred user! 1999-11-22 #14 本人的积分很少,cAkk,o*o,W.H.不要在意我只能拿出这么多分了。