液压油缸内部结构:delphi图片左键菜单

来源:百度文库 编辑:高校问答 时间:2024/05/10 14:21:10
我想左击图片出来一个菜单~~可是属性里没有~在线等待请求帮助~
注意是左击啊`~~不是右击~

要左击呀?
在TImage的OnMouseDown事件里写

var
P:TPoint;
begin
GetCursorPos(P);
if Button=1 then
Popupmenu1.Popup(P.X,P.Y);
end;

新建一个PopupMenu控件,把图片控件的PopupMenu属性设成PopupMenu控件名称就可以了
没看清,呵呵,就是ramu那种写法就行在OnMouseDown事件加Popupmenu1的Popup在鼠标的位置处
var
P:TPoint;
begin
GetCursorPos(P);
if Button=(mbLeft) then
Popupmenu1.Popup(P.X,P.Y);
end;