- 1、本文档共6页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
把图标放在win95的系统托盘(The icon in the system tray Win95)
把图标放在win95的系统托盘(The icon in the system tray Win95)
The icon in the system tray in WIN95
In the system tray icon is called icon (NotifyIcon). This small icon can not only start the program, can also be used to display the running state of the program.
A hWnd is used to receive a mouse generated at the tip of the icon of the event message. But if you use this method, may trigger other controls MouseMove events. In this case, the use of a PictureBox to receive the message from the mouse. The real events include the X parameter in the MouseMove in the event, and then through the code to I from every event.
At the same time, you must also specify the icon to display the handle. Easy to use PictureBox can implement the DragIcon property.
In order to generate a notification icon, you must first be information about icons stored in a custom type variable. Then call Shell_NotifyA. When creating a icon after all mouse events will trigger in the PictureBox MouseMove event. Please note that at the end of the program after the delete icon.
Put a PictureBox in your first form. This example assumes that the Picture1 control named. The Visible property is set to False. The DragIcon property is set to the To you want to display the icon file. Use the following code to create icons in the Form_Load event. Delete icon in the Form_Unload event.
The statement section of the following code in a module in.
DefInt A-Z
Declare Function Shell_NotifyIconA Lib SHELL32 (ByVal dwMessage As Long lpData As NOTIFYICONDATA As Long)
Type NOTIFYICONDATA
CbSize As Long
HWnd As Long
UID As Long
UFlags As Long
UCallbackMessage As Long
HIcon As Long
SzTip As String * 64
End Type
commands flags for NotifyIcons
Global Const NIM_ADD = H0
Global Const NIM_MODIFY = H1
Global Const NIM_DELETE = H2
Global Const NIF_MESSAGE = H1
Global Const NIF_ICON = H2
Global Const NIF_TIP = H4
Global Const WM_MOUSEMOVE = H200
Global NI as NOTIFYICONDATA
Create icons
Put the following code in the Form_Load event to generate a
您可能关注的文档
- 小学四年级信息技术题库·下(The fourth grade primary school of information technology, database).doc
- 小学奥数100题(Primary School Mathematical Olympiad 100 questions).doc
- 小学审美启蒙教育和创造能力的培养(The training of primary school education and the ability to create aesthetic enlightenment).doc
- 小学奥数题(Primary school math problems).doc
- 小学小语文二年级下册 第六单元(The second grade primary school Chinese small volume sixth units).doc
- 小学少年宫长期规划活动方案(Primary school children's palace long-term planning program).doc
- 小学数学小升初模拟试题(Elementary mathematics small rise initial simulation test questions).doc
- 小学文明礼仪主题班会ppt课件(Primary school etiquette class ppt courseware).doc
- 小学新六艺校本课程计划(The new primary school six school-based curriculum plan).doc
- 小学汉语拼音教学十字法(The Chinese Pinyin teaching method cross primary school).doc
- 2023年阿里市司法局公务员考试《行政职业能力测验》历年真题及详解.docx
- 2023年海南省万宁市公安局公务员考试《行政职业能力测验》历年真题及详解.docx
- 2023年阿拉善盟数据局公务员考试《行政职业能力测验》历年真题及详解.docx
- 2023年海南省万宁市自然资源局公务员考试《行政职业能力测验》历年真题及详解.docx
- 2023年海南省三沙市乡村振兴局公务员考试《行政职业能力测验》历年真题及详解.docx
- 2023年海南省三亚市天涯区信访局公务员考试《行政职业能力测验》历年真题及详解.docx
- 2023年海南省三沙市自然资源局公务员考试《行政职业能力测验》历年真题及详解.docx
- 2023年鞍山市农业农村局公务员考试《行政职业能力测验》历年真题及详解.docx
- 2023年鞍山市机关事务管理局公务员考试《行政职业能力测验》历年真题及详解.docx
- 2023年海南省昌江黎族自治县市场监督管理局公务员考试《行政职业能力测验》历年真题及详解.docx
文档评论(0)