systray question

  • Thread starter Thread starter jvcoach23
  • Start date Start date
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
 
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.
 
Back
Top