天天加油 - 助您成才
How can I create a tray icon
您正在看的DELPHI是:How can I create a tray icon。
;

{ Remove the icon from the system tray.}
destructor TTrayIcon.Destroy;
begin
  fIcon.Free;
  if not (csDesigning in ComponentState) then
    Shell_NotifyIcon(Nim_Delete, @fData);
  inherited Destroy;
end;

{ Whenever any information changes, update the system tray. }
procedure TTrayIcon.Changed;
begin
  if not (csDesigning in ComponentState) then
    Shell_NotifyIcon(NIM_MODIFY, @fData);
end;

{ When the Application is minimized, minimize to the system tray.}
procedure TTrayIcon.AppMinimize(Sender: TObject);
begin
  Minimize
end;

{ When restoring from the system tray, restore the application. }
procedure TTrayIcon.AppRestore(Sender: TObject);
begin
  Restore
end;

{
  Message handler for the hidden shell notification window.
  Most messages use Wm_Callback_Message as the Msg ID, with
  WParam as the ID of the shell notify icon data. LParam is
  a message ID for the actual message, e.g., Wm_MouseMove.
  Another important message is Wm_EndSession, telling the
  shell notify icon to delete itself, so Windows can shut down.

  Send the usual Delphi events for the mouse messages. Also
  interpolate the OnClick event when the user clicks the
  left button, and popup the menu, if there is one, for
  right click events.
}

procedure TTrayIcon.OnMessage(var Msg: TMessage);
  { Return the state of the shift keys. }
  function ShiftState: TShiftState;
  begin
    Result := [];
    if GetKeyState(VK_SHIFT) < 0 then
      Include(Result, ssShift);
    if GetKeyState(VK_CONTROL) < 0 then
      Include(Result, ssCtrl);
    if GetKeyState(VK_MENU) < 0

上一页  1 2 3 4 5 6 7 8 9 下一页

排行

  1. VB.NET中的组件开发
  2. 用vb编一个计算器,需要用到数组
  3. VB.Net的ByVal和ByRef --ByVal时
  4. VB.NET操作SQL Server完全模块
  5. VB中定制DllRegisterServer、Dll
  6. VB中打印ACCESS报表
  7. ECLIPSE ANT INTEGRATION
  8. 在eclipse + MyEclipse下配置建立
  9. 基于WebGIS的GPS系统的设计与实现
  10. JBuilder2005+JBOSS+Oracle9i开发
  11. mysql4.1.10的JDBC驱动(mysql-co
  12. 在Win2003+Tomcat+MySQL下运行JP
  13. (原创)当server碰到server,soc
  14. JavaBeans 程序开发从入门到精通
  15. [自创]JCreator安装学习使用方法
  16. 自动生成拼音(汉字反查到拼音)
  1. 在C#中编写多线程应用程序,简单
  2. 盗QQ的密码软件模拟实现(VC)(三)
  3. 让你的软件界面更漂亮 [VC](上)
  4. 获取网卡MAC、硬盘序列号、CPU I
  5. 获取网卡MAC、硬盘序列号、CPU I
  6. VC精华教程:MFC入门系列(三)(上)
  7. Me关键字在.NET中的使用(转)
  8. VB.Net基本语句(推荐)
  9. 字符串加解密的类(VB.NET Sourc
  10. 走近VB.Net(一),VB中的族,类,
  11. .NET平台下Web树形结构程序设计
  12. 用VB.NET和Excel排生产计划--企业
  13. DataGrid常见解决方案(三)--在Da
  14. VB实现局域网内的文件传输
  15. VB.NET中的组件开发
  16. 用vb编一个计算器,需要用到数组
  1. vb可不可以实现虚拟中断
  2. VB.NET中的组件开发
  3. 用vb编一个计算器,需要用到数组
  4. 如何用VB.Net创建一个三层的数据
  5. VB.Net的ByVal和ByRef --ByVal时
  6. VB.NET的阳历与农历转换的算法
  7. VB.NET操作SQL Server完全模块
  8. VB中定制DllRegisterServer、Dll
  9. VB中打印ACCESS报表
  10. 基于WebGIS的GPS系统的设计与实现
  11. JBuilder2005+JBOSS+Oracle9i开发
  12. mysql4.1.10的JDBC驱动(mysql-co
  13. 在Win2003+Tomcat+MySQL下运行JP
  14. (原创)当server碰到server,soc
  15. [自创]JCreator安装学习使用方法
  16. Jsp分页原代码,及用法

最近更新

  • 推荐阅读
  • DELPHI《How can I create a tray icon》How can I create a tray icon
    关于我们 | 版权申明 | 广告服务 | 友情链接 | 网站地图 | 使用帮助 | ©2006-2008 TTADD.COM