G
Guest
Hi All,
I would like to start a VB.Net 2.0 app minimised to the tray area. I use the
NotifyIcon component, set the form to start minimised by adding this to the
form.load event
Me.WindowState = FormWindowState.Minimized
Me.Hide()
and set the notifyicon component property to visible, so it shows in the
tray area. I have also set the showintaskbar property of the main form to
false.
All seems to work well when I run the app; the form does not show on the
taskbar, and I can see the notifiyicon's icon image in the task bar. The
problem is that the form icon is visible in the alt-tab switcher list.
However, if I double click the icon in the taskbar, which runs this code in
the notifyicon doubleclick event handler
Me.Show()
If (Me.WindowState = FormWindowState.Minimized) Then
Me.WindowState = FormWindowState.Normal
Me.Activate()
End If
NotifyIcon.Visible = False
and then minimise the form, which runs this code in the form.resize event
handler
If (Me.WindowState = FormWindowState.Minimized) Then
Me.Hide()
NotifyIcon.Visible = True
then now the form icon does not appear in the alt-tab switcher.
I don't understand what is happening when the form is first shown, that is
not happening when I restore and minimise the form. I have looked in these
newsgroups and on the net but I could not find the answer, so any clues as to
how to accomplish hiding the form from the alt-tab list when it first runs
would be much appreciated. Thanks.
I would like to start a VB.Net 2.0 app minimised to the tray area. I use the
NotifyIcon component, set the form to start minimised by adding this to the
form.load event
Me.WindowState = FormWindowState.Minimized
Me.Hide()
and set the notifyicon component property to visible, so it shows in the
tray area. I have also set the showintaskbar property of the main form to
false.
All seems to work well when I run the app; the form does not show on the
taskbar, and I can see the notifiyicon's icon image in the task bar. The
problem is that the form icon is visible in the alt-tab switcher list.
However, if I double click the icon in the taskbar, which runs this code in
the notifyicon doubleclick event handler
Me.Show()
If (Me.WindowState = FormWindowState.Minimized) Then
Me.WindowState = FormWindowState.Normal
Me.Activate()
End If
NotifyIcon.Visible = False
and then minimise the form, which runs this code in the form.resize event
handler
If (Me.WindowState = FormWindowState.Minimized) Then
Me.Hide()
NotifyIcon.Visible = True
then now the form icon does not appear in the alt-tab switcher.
I don't understand what is happening when the form is first shown, that is
not happening when I restore and minimise the form. I have looked in these
newsgroups and on the net but I could not find the answer, so any clues as to
how to accomplish hiding the form from the alt-tab list when it first runs
would be much appreciated. Thanks.