Chrisjan Lodewyks
Chrisjan Lodewyks

Reputation: 1337

Remove ability to close from taskbar

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?

Upvotes: 10

Views: 3070

Answers (1)

WhyNotHugo
WhyNotHugo

Reputation: 9924

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.

Upvotes: 5

Related Questions