Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Minimizing to tray
Message
De
21/08/2010 14:52:46
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Titre:
Minimizing to tray
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01477733
Message ID:
01477733
Vues:
98
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform