S
superbenben2001
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.NotifyIconMessage(var Message: TMessage);
var
MousePoint:TPoint;
begin
Case Message.LParam of
WM_LButtonDBLclk:
begin
ShowWindow(handle,SW_SHOW);
end;
WM_RButtonDown:
begin
GetCurSorPos(MousePoint);
Popupmenu1.Popup(MousePoint.X,MousePoint.Y);
Popupmenu2.AutoPopup:=false;
end;
WM_LButtonDown:
begin
GetCurSorPos(MousePoint);
Popupmenu2.Popup(MousePoint.X,MousePoint.Y);
Popupmenu1.AutoPopup:=false;
end;
end;
我设置Popupmenu1和Popmenu2两个弹出菜单.
当按书标左键时弹出Popmenu2, 当按书标右键时弹出Popmenu1 ??
可是却出现了一个问题??
当按书标左键时弹出Popmenu2, 但是再书标右键时,Popmenu1没有弹出??Popmenu2应该消失? 反之也是这样??
应该怎么做?
var
MousePoint:TPoint;
begin
Case Message.LParam of
WM_LButtonDBLclk:
begin
ShowWindow(handle,SW_SHOW);
end;
WM_RButtonDown:
begin
GetCurSorPos(MousePoint);
Popupmenu1.Popup(MousePoint.X,MousePoint.Y);
Popupmenu2.AutoPopup:=false;
end;
WM_LButtonDown:
begin
GetCurSorPos(MousePoint);
Popupmenu2.Popup(MousePoint.X,MousePoint.Y);
Popupmenu1.AutoPopup:=false;
end;
end;
我设置Popupmenu1和Popmenu2两个弹出菜单.
当按书标左键时弹出Popmenu2, 当按书标右键时弹出Popmenu1 ??
可是却出现了一个问题??
当按书标左键时弹出Popmenu2, 但是再书标右键时,Popmenu1没有弹出??Popmenu2应该消失? 反之也是这样??
应该怎么做?