By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,481 Members | 3,078 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,481 IT Pros & Developers. It's quick & easy.

I don't want to see an application in "Alt+Tab" list. Help ...

P: n/a
Hi,

I have an application VB.NET (using Form Win32) with no icon in TaskBar.

When a FORM of this application is visible I see this application in the
list of "Alt+Tab" choice.

How do for this application does not appear in this list when a FORM is
visible ?

Thanks you by advance for your help...

Denis.
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Sorry i have forgeten an important information :

My application have an "NotifyIcon" in "TaskBar" (zone : TrayIcon). It is
always visible.

"dencdr" <de****@free.fr> a écrit dans le message de
news:Ol**************@TK2MSFTNGP09.phx.gbl...
Hi,

I have an application VB.NET (using Form Win32) with no icon in TaskBar.

When a FORM of this application is visible I see this application in the
list of "Alt+Tab" choice.

How do for this application does not appear in this list when a FORM is
visible ?

Thanks you by advance for your help...

Denis.

Nov 20 '05 #2

P: n/a
Denis,
It sounds like you used a Form as the startup object of your project, which
you hide, to allow having a NotifyIcon in the system tray. Correct?

Matthew MacDonald's book "Microsoft Visual Basic .NET Programmer's Cookbook"
has a topic on creating a system tray program.

Basically: Rather than using a Form as the startup object, use a Component
instead.

Create a new Component class (use Project - Add Component). Add a NotifyIcon
to the component designer. Also add a ContextMenu object for the
NotifyIcon. When you click the menu, create and show the form. Remember to
put an Exit option on the menu.

Make the Component the startup object, adding a Shared Sub Main to the
component.

Public Class Component1
Inherits System.ComponentModel.Component

' Component designer generated code omitted.

Public Shared Sub Main
Dim app as New Component1
Application.Run()
End Sub

Private Sub menuOptions_Click(...) Handles menuOptions.Click
' this would be your settings dialog.
Dim dialog as New OptionsDialog
dialog.ShowDialog()
dialog.Dispose()
End Sub

Private Sub menuExit_Click(...) Handles menuExit.Click
Me.Dispose()
Application.Exit()
End Sub

End Sub

The problem is you cannot edit the menu from the Component Designer. What I
do is use cut & paste from a Form Designer onto the Component Designer to
get the menu to the component...

The call to Me.Dispose enables the icon to be removed from the system tray
right away rather then waiting.

Hope this helps
Jay


"dencdr" <de****@free.fr> wrote in message
news:Oq**************@tk2msftngp13.phx.gbl...
Sorry i have forgeten an important information :

My application have an "NotifyIcon" in "TaskBar" (zone : TrayIcon). It is
always visible.

"dencdr" <de****@free.fr> a écrit dans le message de
news:Ol**************@TK2MSFTNGP09.phx.gbl...
Hi,

I have an application VB.NET (using Form Win32) with no icon in TaskBar.

When a FORM of this application is visible I see this application in the
list of "Alt+Tab" choice.

How do for this application does not appear in this list when a FORM is
visible ?

Thanks you by advance for your help...

Denis.


Nov 20 '05 #3

P: n/a
Thank you very much,
I am beginer in Vb.net, it will be very existing to do that.

Thanks again..

Denis.

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> a écrit dans le
message de news:O6**************@TK2MSFTNGP09.phx.gbl...
Denis,
It sounds like you used a Form as the startup object of your project, which you hide, to allow having a NotifyIcon in the system tray. Correct?

Matthew MacDonald's book "Microsoft Visual Basic .NET Programmer's Cookbook" has a topic on creating a system tray program.

Basically: Rather than using a Form as the startup object, use a Component
instead.

Create a new Component class (use Project - Add Component). Add a NotifyIcon to the component designer. Also add a ContextMenu object for the
NotifyIcon. When you click the menu, create and show the form. Remember to
put an Exit option on the menu.

Make the Component the startup object, adding a Shared Sub Main to the
component.

Public Class Component1
Inherits System.ComponentModel.Component

' Component designer generated code omitted.

Public Shared Sub Main
Dim app as New Component1
Application.Run()
End Sub

Private Sub menuOptions_Click(...) Handles menuOptions.Click
' this would be your settings dialog.
Dim dialog as New OptionsDialog
dialog.ShowDialog()
dialog.Dispose()
End Sub

Private Sub menuExit_Click(...) Handles menuExit.Click
Me.Dispose()
Application.Exit()
End Sub

End Sub

The problem is you cannot edit the menu from the Component Designer. What I do is use cut & paste from a Form Designer onto the Component Designer to
get the menu to the component...

The call to Me.Dispose enables the icon to be removed from the system tray
right away rather then waiting.

Hope this helps
Jay


"dencdr" <de****@free.fr> wrote in message
news:Oq**************@tk2msftngp13.phx.gbl...
Sorry i have forgeten an important information :

My application have an "NotifyIcon" in "TaskBar" (zone : TrayIcon). It is always visible.

"dencdr" <de****@free.fr> a écrit dans le message de
news:Ol**************@TK2MSFTNGP09.phx.gbl...
Hi,

I have an application VB.NET (using Form Win32) with no icon in TaskBar.
When a FORM of this application is visible I see this application in the list of "Alt+Tab" choice.

How do for this application does not appear in this list when a FORM is visible ?

Thanks you by advance for your help...

Denis.



Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.