Display App in taskbar when visible = false
-
Hello All, I have a rather strange app that I want to keep visible in the taskbar at all times, even when the app is set to visible = false. Thanks in advance for your time and help.
-
Hello All, I have a rather strange app that I want to keep visible in the taskbar at all times, even when the app is set to visible = false. Thanks in advance for your time and help.
you can achieve it by overriding OnVisibleChanged. In overrided method, you can force to minimize whenever set visible to false protected override void OnVisibleChanged(EventArgs e) { if(this.Visible == false) { this.Visible = true; this.WindowState = FormWindowState.Minimized; } else base.OnVisibleChanged(e); }
-
you can achieve it by overriding OnVisibleChanged. In overrided method, you can force to minimize whenever set visible to false protected override void OnVisibleChanged(EventArgs e) { if(this.Visible == false) { this.Visible = true; this.WindowState = FormWindowState.Minimized; } else base.OnVisibleChanged(e); }
A bit modification for my last reply ... you can achieve by VisibleChanged Event of form too!!! private void Form2_VisibleChanged(object sender, EventArgs e) { if(this.Visible == false) { this.Visible = true; this.WindowState = FormWindowState.Minimized; } }
-
A bit modification for my last reply ... you can achieve by VisibleChanged Event of form too!!! private void Form2_VisibleChanged(object sender, EventArgs e) { if(this.Visible == false) { this.Visible = true; this.WindowState = FormWindowState.Minimized; } }
Thanks MqPasta, I've put it into my app and it did the job. Thanks once more for your time, Robert