VERSION 5.00
Begin VB.Form frmTray 
   Caption         =   "Form1"
   ClientHeight    =   3105
   ClientLeft      =   60
   ClientTop       =   435
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3105
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
End
Attribute VB_Name = "frmTray"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Static Message As Long
    Message = X / Screen.TwipsPerPixelX
    Select Case Message
        Case WM_LBUTTONDBLCLK
            frmBot.mnuShow_Click
        Case WM_RBUTTONDOWN
            PopupMenu frmBot.mnuTClick
    End Select
End Sub

Public Sub TrayAdd(ByRef Tooltip As String)
    With nID
        .cbSize = Len(nID)
        .hWnd = frmTray.hWnd
        .uId = vbNull
        .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
        .uCallBackMessage = WM_MOUSEMOVE
        .hIcon = frmBot.Icon
        .szTip = Tooltip & vbNullChar
    End With
    Shell_NotifyIcon NIM_ADD, nID
End Sub

Public Sub TrayDelete()
    Shell_NotifyIcon NIM_DELETE, nID
End Sub

Public Sub TrayModifyIcon(ByRef Icon As StdPicture)
    nID.hIcon = Icon.Handle
    Shell_NotifyIcon NIM_MODIFY, nID
End Sub

Public Sub TrayModifyTip(ByRef Tooltip As String)
    nID.szTip = Tooltip & vbNullChar
    Shell_NotifyIcon NIM_MODIFY, nID
End Sub
