怎么样才能在系统托盘的图标上点出菜单?
----------------------------------------------
I want a click, a click to your heart A hyperlink into you. A sexual browser from here to the end A newsgroup one on one Don't need a modem to connect to your mind No search engine to find you
自己顶
----------------------------------------------
I want a click, a click to your heart A hyperlink into you. A sexual browser from here to the end A newsgroup one on one Don't need a modem to connect to your mind No search engine to find you
自己顶 ~!!
----------------------------------------------
I want a click, a click to your heart A hyperlink into you. A sexual browser from here to the end A newsgroup one on one Don't need a modem to connect to your mind No search engine to find you
在图标点 左右键 可以弹出菜单
----------------------------------------------
I want a click, a click to your heart A hyperlink into you. A sexual browser from here to the end A newsgroup one on one Don't need a modem to connect to your mind No search engine to find you
var Form1: TForm1; tray1:TNotifyIconData; ico1:ticon;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject); begin ico1:=ticon.Create; imagelist1.GetIcon(0,ico1); tray1.cbSize:=sizeof(tray1); tray1.Wnd:=form1.Handle; tray1.uID:=0; tray1.uFlags:=NIF_ICON or NIF_TIP or NIF_MESSAGE; tray1.uCallbackMessage:=ghy_tray; tray1.hIcon:=ico1.Handle; tray1.szTip:='我的托盘程序';
Shell_NotifyIcon(NIM_ADD,@tray1); end;
procedure TForm1.Button1Click(Sender: TObject); begin Shell_NotifyIcon(NIM_delete,@tray1); end;
procedure TForm1.Button2Click(Sender: TObject); begin Shell_NotifyIcon(NIM_add,@tray1); end;
procedure tform1.mytray(var Msg: TMessage); var pt:tpoint; begin GetCursorPos(pt); if msg.lParam=WM_LBUTTONDOWN then {鼠标左键被按下时,执行下面语句} begin if form1.Visible ={wsMinimized}true then begin application.Minimize; form1.Hide; end else begin form1.Show; form1.WindowState:=wsnormal; end end else if msg.lParam=WM_LBUTTONUP then {左键被放起时,释放鼠标左键} begin end else if msg.lParam=wm_rbuttondown then {鼠标右键被按下,执行下面语句} begin SetForegroundWindow(Form1.Handle); form1.PopupMenu1.Popup(pt.x,pt.y); end else {调用父类的WndProc方法处理其它消息} inherited; end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin Shell_NotifyIcon(NIM_delete,@tray1); end;
procedure TForm1.N1Click(Sender: TObject); begin showmessage('谢谢你使用这个托盘演示程序'); end;
procedure TForm1.N2Click(Sender: TObject); begin application.Terminate; end;
在执行WM_LBUTTONDOWN 怎么判断程序为当前窗口??????????? ?????????????????????????????????
----------------------------------------------
I want a click, a click to your heart A hyperlink into you. A sexual browser from here to the end A newsgroup one on one Don't need a modem to connect to your mind No search engine to find you