Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Minimizing to tray
Message
From
21/08/2010 14:52:46
 
 
To
All
General information
Forum:
ASP.NET
Category:
Web forms
Title:
Minimizing to tray
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01477733
Message ID:
01477733
Views:
97
I have this which minimizes the form to the tray:
Public Class Form1
    Inherits Framework.Form

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

        ' Add a handler when the window will be minized
        AddHandler Resize, AddressOf MainForm_Minimize

        ' Add a handler for the notify icon double click
        AddHandler NotifyIcon1.DoubleClick, AddressOf NotifyIcon1_MouseDoubleClick

        ' Do not show this window in taskbar
        ShowInTaskbar = False

    End Sub

    Private Sub MainForm_Minimize(ByVal sender As Object, ByVal e As EventArgs)

        If WindowState = FormWindowState.Minimized Then
            NotifyIcon1.Visible = True
            NotifyIcon1.Text = "CCS Agent"
        End If

    End Sub

    Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As Object, ByVal e As MouseEventArgs)
        WindowState = FormWindowState.Normal
        Show()
    End Sub

End Class
However, when the window is minimized to the tray, it also shows in the lower left of the desktop as a sort of minimized window. Anyone experiences the same thing?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform