Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove ability to close from taskbar

Tags:

c#

.net

windows-7

I would like to remove the ability for a user to close a window in my application from the taskbar in windows 7:

enter image description here

The close button in the image should not be available.

Any suggestions?

like image 566
Chrisjan Lodewyks Avatar asked Jun 26 '12 07:06

Chrisjan Lodewyks


People also ask

How do I disable the close button?

Answer: To disable the Close button on an Access form, open the form in Design view. Under the View menu, select Properties. When the Properties window appears, set the "Close Button" property to No.

How do I get rid of the new taskbar in Windows 10?

Fortunately, Microsoft has made it easy to disable the News and Interest taskbar in 3 easy steps: Right-click with your mouse anywhere on the taskbar. Select News and Interests from the Menu. Click on Turn off.


1 Answers

You shouldn't do this. Window managing/decorating is left to the window manager, you should rather handle the "close" event in some way, and avoid the applicaiton exiting.

Also, middle clicking (mouse2) on any part of that preview will also close the window, so it's not a matter of just hiding that button.

like image 156
WhyNotHugo Avatar answered Sep 27 '22 18:09

WhyNotHugo