pinoyz

how to minimize to systemstray

when the program minimze to system stray, the program still processing




Re: Visual Basic Express Edition how to minimize to systemstray?

WayneSpangler

Yes the program continues to execute.

To minimize to tray use:

Me.WindowState = FormWindowState.Minimized

To restore use:

Me.WindowState = FormWindowState.Normal






Re: Visual Basic Express Edition how to minimize to systemstray?

pinoyz

what i mean is minimize on a systemstray("where you can find clock, Volume, Task Scheduler")




Re: Visual Basic Express Edition how to minimize to systemstray?

Lars Breiter

There are a few steps you have to take.

1. Create a NotifyIcon
Public WithEvents m_ni As New NotifyIcon
Public WithEvents m_mnuClose As New MenuItem("Programm Exit")
Public WithEvents m_mnuStrich1 As New MenuItem("-")
Public WithEvents m_mnuAbout As New MenuItem("About")

2. In your Form_Load
m_ni.Icon = ICO.icoGelb
m_ni.ContextMenu = New ContextMenu(New MenuItem() {m_mnuAbout, m_mnuStrich1, m_mnuClose})
m_ni.Text = "This is some sample Text"
m_ni.Visible = True

3. At some point in your Programm, set the Property "Visible" of your Form to false

This is untested, but it should work