chgicon.bas

来自「获取操作系统启动权限」· BAS 代码 · 共 33 行

BAS
33
字号
Attribute VB_Name = "chgIcon"
'-- Used by Shell_NotifyIconA
Type NOTIFYICONDATA
    cbSize              As Long
    Hwnd                As Long     '-- Handle of the window that receives notification messages
    uID                 As Long     '-- App-defined identifier of the taskbar icon
    uFlags              As Long     '-- Flags
    uCallbackMessage    As Long     '-- App-defined message identifier
    hIcon               As Long     '-- Handle to an icon
    szTip               As String * 64  '-- Tool text display message
End Type
    
Global Const NIM_ADD = 0
Global Const NIM_MODIFY = 1
Global Const NIM_DELETE = 2

Global Const NIF_MESSAGE = 1
Global Const NIF_ICON = 2
Global Const NIF_TIP = 4
Global Const WM_MOUSEMOVE = &H200

Global Const WM_LBUTTONDBLCLK = &H203   'Double-click
Global Const WM_LBUTTONDOWN = &H201     'Button down
Global Const WM_LBUTTONUP = &H202       'Button up

'Right-click constants.
Global Const WM_RBUTTONDBLCLK = &H206   'Double-click
Global Const WM_RBUTTONDOWN = &H204     'Button down
Global Const WM_RBUTTONUP = &H205       'Button up

Declare Function Shell_NotifyIconA Lib "shell32" (ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Integer

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?