VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Add Your App to the Systray the Easy Way

by Angsuman Banerji (23 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 4th January 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Add Your App to the Systray the Easy Way

Rate Add Your App to the Systray the Easy Way




Private Sub Form_Load() 
    Set m_frmSysTray = New frmSysTray 
    With m_frmSysTray 
        .AddMenuItem "&Open SysTray Sample", "open", True 
        .AddMenuItem "-" 
        .AddMenuItem "&Close", "close" 
        .ToolTip = "SysTray Sample!" 
        .IconHandle = Me.Icon.Handle 
    End With 
End Sub 

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) 
    Unload m_frmSysTray 
    Set m_frmSysTray = Nothing 
End Sub 

Private Sub m_frmSysTray_MenuClick(ByVal lIndex As Long, ByVal sKey As String) 
    Select Case sKey 
    Case "open" 
        Me.Show 
        Me.ZOrder 
    Case "close" 
        Unload Me 
    End Select 
    
End Sub 

Private Sub m_frmSysTray_SysTrayDoubleClick(ByVal eButton As MouseButtonConstants) 
    Me.Show 
    Me.ZOrder 
End Sub 

Private Sub m_frmSysTray_SysTrayMouseDown(ByVal eButton As MouseButtonConstants) 
    If (eButton = vbRightButton) Then 
        m_frmSysTray.ShowMenu 
    End If
End Sub 



Download this snippet    Add to My Saved Code

Add Your App to the Systray the Easy Way Comments

No comments have been posted about Add Your App to the Systray the Easy Way. Why not be the first to post a comment about Add Your App to the Systray the Easy Way.

Post your comment

Subject:
Message:
0/1000 characters