shawnhee
Member
- Joined
- Dec 2, 2020
- Messages
- 10
- Programming Experience
- Beginner
I want to minimize my windows form when i clicked anywhere outside it.... But this code will just close the whole program, can anyone help? I want to hide the app to taskbar, and when i press it from taskbar it shows up again.......
Here is the code:
Please help..... Your help is much appreciated
Here is the code:
C#:
protected override void OnMouseCaptureChanged(EventArgs e)
{
if (!this.Capture)
{
if (!this.RectangleToScreen(this.DisplayRectangle).Contains(Cursor.Position))
{
this.Hide();
}
else
{
this.Capture = true;
}
}
base.OnMouseCaptureChanged(e);
}
Please help..... Your help is much appreciated
Last edited by a moderator: