2楼 dirotac (一粒沙尘) 回复于 2002-04-24 21:03:49 得分 50
//放在模块里
' Copyright (c) 1997-2000 Hai Li, Zeal SoftStudio.
' E-Mail:info@zealsoftstudio.com
' http://www.zealsoftstudio.com (English)
' http://www.nease.net/~zealsoft/ (Chinese)
Option Explicit
Public 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
'constants required by Shell_NotifyIcon API call:
Public Const NIM_ADD = &H0
Public Const NIM_MODIFY = &H1
Public Const NIM_DELETE = &H2
Public Const NIF_MESSAGE = &H1
Public Const NIF_ICON = &H2
Public Const NIF_TIP = &H4
Public Const WM_MOUSEMOVE = &H200
Public Const WM_LBUTTONDOWN = &H201 'Button down
Public Const WM_LBUTTONUP = &H202 'Button up
Public Const WM_LBUTTONDBLCLK = &H203 'Double-click
Public Const WM_RBUTTONDOWN = &H204 'Button down
Public Const WM_RBUTTONUP = &H205 'Button up
Public Const WM_RBUTTONDBLCLK = &H206 'Double-click
Public Declare Function SetForegroundWindow Lib "user32" _
(ByVal hwnd As Long) As Long
Public Declare Function Shell_NotifyIcon Lib "shell32" _
Alias "Shell_NotifyIconA" _
(ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
Public nid As NOTIFYICONDATA
Declare Sub Outport Lib "vbio32.dll" (ByVal portID As Integer, ByVal nbyte As Integer)
Declare Sub OutportW Lib "vbio32.dll" (ByVal portID As Integer, ByVal nWord As Integer)
Declare Sub OutportD Lib "vbio32.dll" (ByVal portID As Integer, ByVal dwDWord As Long)
Declare Function Inport Lib "vbio32.dll" (ByVal portID As Integer) As Integer
Declare Function InportW Lib "vbio32.dll" (ByVal portID As Integer) As Integer
Declare Function InportD Lib "vbio32.dll" (ByVal portID As Integer) As Long
Declare Function IsWinNT Lib "vbio32.dll" () As Boolean
Declare Function GetLPTPortAddress Lib "vbio32.dll" (ByVal portID As Integer) As Integer