systray question

J

jvcoach23

please direct me to the correct news group if this is not the proper place
to ask.

I have the systray icon working. what i can't get to work is so that when
i click the minimize icon the windows form, to get the icon to go away at
the bottom, i only want to be able to get the form back up by clicking on
the systray icon.

Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Me.ShowInTaskbar = False
Me.nIcon.Visible = True 'These lines need to run before you hide the
form for some reason....
Me.Hide()
e.Cancel = True 'Stops the form from closing after you hide it.
End Sub

but that isn't getting it done..

anyone willing to help out
thanks
 
V

vvnraman

please direct me to the correct news group if this is not the proper place
to ask.

I have the systray icon working. what i can't get to work is so that when
i click the minimize icon the windows form, to get the icon to go away at
the bottom, i only want to be able to get the form back up by clicking on
the systray icon.

Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Me.ShowInTaskbar = False
Me.nIcon.Visible = True 'These lines need to run before you hide the
form for some reason....
Me.Hide()
e.Cancel = True 'Stops the form from closing after you hide it.
End Sub

but that isn't getting it done..

anyone willing to help out
thanks

Hi jvcoach23
I wrote a similar program is C#.
The code to hide, show, minimise or close the form should be
in the Form resize event.

There is a NotifyIcon on the Form which resides in the
system tray plus a ContextMenu.
There are currently three options on the contextMenu,
Oen, Minimise and Exit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top