Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Minimizing to tray
Message
From
21/08/2010 15:03:15
 
 
To
21/08/2010 14:52:46
General information
Forum:
ASP.NET
Category:
Web forms
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:
01477735
Views:
40
This adjustment has resolved it:
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 MouseDown
        AddHandler NotifyIcon1.MouseDown, AddressOf NotifyIcon1_MouseDown

        ' 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"
            Hide()
        End If

    End Sub

    Private Sub NotifyIcon1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs)
        Show()
        NotifyIcon1.Visible = False
        WindowState = FormWindowState.Normal
        Focus()
    End Sub

End Class
I guess with the previous version, when ShowInTaskbar=False, the EXE will be forced to be shown in the lower left of the desktop. The Hide() command resolves the issue.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform