留e-mail,我发个控件和例子给你。
解决方案 »
- 求Rave报表使用详细说明
- Delphi7写了个程序,昨天还好的,今天在编译执行时出现Debugger exception'Property BCDToCurrency does not exist',有知道的吗?
- 关于DevExpress V*.33版本的Skin使用问题
- 有谁能发给我一个RAVE临时表打印的例子啊!我在网上找了好久都没找着,难过!
- DBedit为什么不让编辑
- 一个简单的问题,谢谢!
- 圣诞快乐!散分(1)
- Delphi低版本和高版本有何区别?
- Delphi7如何实现提示窗口,用户可以随时中止应用循环?
- 请教一个有关memo控件的问题
- 关于用dll做mdi子窗口,当mainform关闭时……
- 2万元/月招聘图形处理高手!
var
Sicon:TnotifyIconData;
begin
SBexpend.Glyph.LoadFromResourceName(HInstance,'EXPEND0');
{Application.OnMinimize:=Onmin; //设置处理最小化的过程 }
//隐藏任务栏图标
SetWindowLong(Application.Handle,
GWL_EXSTYLE, WS_EX_TOOLWINDOW);
//加图标到系统托盘
with Sicon do
begin
cbSize:=Sizeof(TnotifyIconData);
Wnd:=Handle;
UID:=MY_TRAY_ICON;
uFlags:=NIF_MESSAGE or NIF_ICON or NIF_TIP;
ucallbackMessage:=WM_TrayNotify;
hIcon:=application.icon.Handle;
Shell_NotifyIcon(NIM_ADD,@Sicon);//前边设置图标的各属性;这句
//加到图标栏!
end;
end;
//响应系统图标的鼠标事件
procedure TFormNotice.WmTRayNotify(var Msg:Tmessage);
var
mousept: TPoint; //鼠标点击位置
begin
if (msg.LParam=WM_RbuttonDown) then
begin
getCursorPos(mousept);
popupmenu1.Popup(mousept.x,mousept.y);
end;
if (Msg.LParam=WM_LBUTTONDBLCLK) then
begin
showwindow1Click(self);
end;
end;//加个popupmenu,showwindow 和exit两个菜单项对应以下操作
procedure TFormNotice.showwindow1Click(Sender: TObject);
begin
showWindow(Application.Handle,SW_SHOW);
application.Restore;
end;//结束程序时记得注销icon;
procedure TFormNotice.exit1Click(Sender: TObject);
var
Sicon:TnotifyIconData;
begin
with Sicon do
begin
cbSize:=Sizeof(TnotifyIconData);
Wnd:=Handle;
UID:=MY_TRAY_ICON;
uFlags:=NIF_MESSAGE or NIF_ICON or NIF_TIP;
ucallbackMessage:=WM_TrayNotify;
end;
Shell_NotifyIcon(NIM_Delete,@Sicon);
Application.Terminate;
end;