maximize my application from the system tray

G

Guest

Hello,
I have an icon in my system tray and I wish to call various functions
from withing the tray which involve the application been maximized. The
following event is on the system tray icon

Dim mouse As Cursor
Dim Myprojectdet As New frmProjectDetails
If SetupContextMenu(cmnuSysTray, "SystemTray",
Myprojectdet.ImgJobDetails) Then
cmnuSysTray.TrackPopup(New
System.Drawing.Point(mouse.Position.X, mouse.Position.Y))
End If

The context menu displays the correct menu options but how to I maximize my
main form FrmMain from the this event.
 
M

Michelle

Hi Geraldine,

Here is what I use to maximize my form from the context menu click
event:

Me.WindowState = FormWindowState.Maximized
Me.Activate()
Me.Focus()


Take care,
Michelle
 

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