Sorry about the confusion. In the tutorial I read on it they provided the code for the event but for some reason my programs don't recognize it if I don't actually signal the event, if I type for a buttons action to occur it doesn't occur unless I actually click the button to force the code in. Here's what I'm struggling with.
I have a button called "Hide". When I click the hide button my code says:
and that's all. When I launch my program it shows up in the system tray and on the task bar, then when I click my "hide" button the form is no longer visible on my task bar or on the screen as a window, but is present in my system tray still. When I then have this code present that is supposed to capture the event if i minimize my form it just minimizes the window and leaves it on my task bar which I can only assume means that my event is not matching the code I have that is supposed to tell it what to do:
-
private void Form1_Resize(object sender, EventArgs e)
-
{
-
if (WindowState == FormWindowState.Minimized)
-
{
-
HideTheForm();
-
ShowInTaskbar = false;
-
}
-
}
-
The solution that got it working was to click that lightening bolt you mentioned then choose "SizeChanged" and choose "Form1_Resized" that got it working correctly. Thank you for helping me figure this out.