托盘显示信息

来源:百度知道 编辑:UC知道 时间:2024/05/17 22:21:09
像迅雷那样,鼠标移到托盘那里的时候它会显示下载的信息,它是如何做到的?
答非所问

mousemove事件触发的

示例
[Visual Basic, C#, C++] 下面的示例演示使用不同的鼠标事件在 Panel 上绘制鼠标路径。对于发生的每个 MouseMove 和 MouseDown 事件,都将一个线段添加到 GraphicsPath。要更新该图形,请为每个 MouseDown 和 MouseUp 事件上的 Panel 调用 Invalidate 方法。此外,当 MouseWheel 事件发生时,图形路径将向上滚动或向下滚动。其他鼠标事件(如 MouseHover)也在屏幕上标识。同时屏幕上还显示有关 SystemInformation 类中鼠标的其他信息。

[Visual Basic]
Imports System
Imports System.Drawing
Imports System.Windows.Forms

Namespace MouseEvent
' Summary description for Form1.
Public NotInheritable Class Form1
Inherits System.Windows.Forms.Form

Friend WithEvents panel1 As System.Windows.Forms.Panel
Private label1 As System.Windows.Forms.Label
Private label2 As System.Windows.Forms.Label
Private label3 As System.Windows.Forms.Label
Private label4 As System.Windows.Forms.Label
Private label5 As System.Windows.Forms.Label
Private label6 As System.Window