... odd problem ... when my form/application is minimized (to the systray using a NotifyIcon) and I try to resize it to screen (when I click on it), sometimes it just appears on my taskbar but it is minimized and I can't restore it, only way to fix the problem is to kill the application.
When the user clicks on the NotifyIcon the application should resize of screen - worst case scenario if ever it is minimized and I click on it (when it is in the taskbar) it should restore the application - which currently it doesn't.
This is the code I am using when the user clicks on the NotifyIcon:
So I am thinking I am missing something here to ensure that the application APPEARS on my screen and doesn't remain minimized or some manual code to ensure that it resizes correctly.
Something like form.size = (608,307) or something so that I can be 100% sure that the programs appears on screen with the right size and doesn't stay minimized thus putting me in a terrible state.
Can't you programatically ensure that:
a) the form is NOT minimized (and if it is ensure it is maximized so the user can see it)
b) the form is of the correct size? (which is a locked size and never varies - the user is not permitted to resize the application)
Thanks,
When the user clicks on the NotifyIcon the application should resize of screen - worst case scenario if ever it is minimized and I click on it (when it is in the taskbar) it should restore the application - which currently it doesn't.
This is the code I am using when the user clicks on the NotifyIcon:
Code:
private void pNotifyIcon_Click(object sender, System.EventArgs e)
{ // make window visible
WindowState = FormWindowState.Normal;
BringToFront();
Focus();
}
So I am thinking I am missing something here to ensure that the application APPEARS on my screen and doesn't remain minimized or some manual code to ensure that it resizes correctly.
Something like form.size = (608,307) or something so that I can be 100% sure that the programs appears on screen with the right size and doesn't stay minimized thus putting me in a terrible state.
Can't you programatically ensure that:
a) the form is NOT minimized (and if it is ensure it is maximized so the user can see it)
b) the form is of the correct size? (which is a locked size and never varies - the user is not permitted to resize the application)
Thanks,