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

📄 frmsystrayicon.frm

📁 本系统是我个人自己做出来的哦
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSYSTRAYICON 
   Caption         =   "Library Management System"
   ClientHeight    =   3195
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   4680
   Icon            =   "frmSYSTRAYICON.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.PictureBox picHook 
      Height          =   855
      Left            =   1200
      ScaleHeight     =   795
      ScaleWidth      =   1635
      TabIndex        =   0
      Top             =   1200
      Width           =   1695
   End
   Begin VB.Menu mnuPopupMenu 
      Caption         =   "popupMenu"
      Begin VB.Menu mnuLogOff 
         Caption         =   "&Log Off"
      End
      Begin VB.Menu mnuAboutMe 
         Caption         =   "&About Me"
      End
      Begin VB.Menu mnuExit 
         Caption         =   "&Exit"
      End
   End
End
Attribute VB_Name = "frmSYSTRAYICON"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'=====================================================
'*****************************************************
'* Programmed by : Vivek Patel                       *
'* Contact :  Email   => vivek_patel9@rediffmail.com *
'*            Website => www.VIVEKPATEL.cjb.net      *
'* Description : Code for displaying SystemTray Icon *
'*               on Application Start-Up             *
'* Vote For Me : If you really enjoy this utility or *
'                 helped by any of the functionality *
'                 than plz. reward us by your VOTE.  *
'*****************************************************
'=====================================================


Option Explicit

'**************************************
' Menu Options Coding [begin]
'**************************************
Private Sub mnuLogOff_Click()
    Call loggedOff
End Sub

Private Sub mnuAboutMe_Click()
    frmAbout.Show
End Sub

'When trying to unload application from SystemTray
Private Sub mnuExit_Click()
    Unload frmMain
End Sub

'**************************************
' Menu Options Coding [end]
'**************************************




'***************************************
' System Tray Icon  [begin]
'***************************************
Private Sub Form_Load()
    On Error Resume Next
    t.cbSize = Len(t)
    'Set the window's handle (this will be used to hook the specified window)
    t.hWnd = picHook.hWnd
    'Application-defined identifier of the taskbar icon
    t.uId = 1&
    'Set the flags
    t.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
    'Set the callback message
    t.ucallbackMessage = WM_MOUSEMOVE
    'Set the picture (must be an icon!)
    t.hIcon = Me.Icon
    'Set the tooltiptext
    t.szTip = "Library Management System." & Chr$(0)
    'Create the icon
    Shell_NotifyIcon NIM_ADD, t
    Me.Hide
    App.TaskVisible = False
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error Resume Next
    t.cbSize = Len(t)
    t.hWnd = picHook.hWnd
    t.uId = 1&
    Shell_NotifyIcon NIM_DELETE, t
End Sub


Private Sub pichook_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
    Static rec As Boolean, msg As Long
    msg = X / Screen.TwipsPerPixelX
    If rec = False Then
        rec = True
        Select Case msg
            Case WM_LBUTTONDBLCLK:
                MsgBox "Please Vote for Me !", vbExclamation, "Library Management System"
            Case WM_LBUTTONDOWN:
            Case WM_LBUTTONUP:
            Case WM_RBUTTONDBLCLK:
            Case WM_RBUTTONDOWN:
            Case WM_RBUTTONUP:
                Me.PopupMenu mnuPopupMenu
        End Select
        rec = False
    End If
End Sub

'***************************************
' System Tray Icon  [end]
'***************************************


'=====================================================
'*****************************************************
'* Vote For Me : If you really enjoy this utility or *
'                 helped by any of the functionality *
'                 than plz. reward us by your VOTE.  *
'*****************************************************
'=====================================================

⌨️ 快捷键说明

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