⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmtray.frm

📁 进程管理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmTray 
   Caption         =   "Form2"
   ClientHeight    =   3090
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   4680
   Icon            =   "frmTray.frx":0000
   LinkTopic       =   "Form2"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.PictureBox Picture1 
      Height          =   255
      Left            =   960
      Picture         =   "frmTray.frx":000C
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   0
      Top             =   720
      Width           =   255
   End
   Begin VB.Menu mnuM 
      Caption         =   "mun"
      Begin VB.Menu mnuopen 
         Caption         =   "打开"
      End
      Begin VB.Menu sp 
         Caption         =   "-"
      End
      Begin VB.Menu mnuleft 
         Caption         =   "退出"
      End
   End
End
Attribute VB_Name = "frmTray"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
Dim T As NOTIFYICONDATA
Private 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
Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2
Private Const WM_MOUSEMOVE = &H200
Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4

Private Sub Form_Initialize()
InitCommonControls
End Sub

Private Sub Form_Load()
On Error Resume Next
SetIcon Me.hWnd, "AAA"

Me.Hide
Form1.Show
T.cbSize = Len(T)
    T.hWnd = Picture1.hWnd
    T.uId = 1&
    T.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
    T.ucallbackMessage = WM_MOUSEMOVE
    T.hIcon = Picture1.Picture
    T.szTip = "ZX Messenger 进程监视" & Chr$(0)
    Shell_NotifyIcon NIM_ADD, T
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
T.cbSize = Len(T)
    T.hWnd = Picture1.hWnd
    T.uId = 1&
    Shell_NotifyIcon NIM_DELETE, T
End Sub

Private Sub mnuleft_Click()
MeUnload = True

Unload Me
Unload Form1
Unload frmAbout

End Sub

Private Sub mnuopen_Click()
Form1.WindowState = 0
Form1.Show

End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Hex(X) = "1E3C" Then
Me.PopupMenu Me.mnuM, 0
End If

End Sub

⌨️ 快捷键说明

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