How to hide only the Close (x) button?

stefano m picture stefano m · Sep 4, 2011 · Viewed 240.2k times · Source

I have a modal dialog, and need to hide the Close (X) button, but I cannot use ControlBox = false, because I need to keep the Minimize and Maximize buttons.

I need to hide just Close button, is there any way to do that?

Thanks a lot!

Update: I had permission to disable it, which is simpler :) Thanks all!

Answer

Abhishek.Chopra picture Abhishek.Chopra · Nov 9, 2012

We can hide close button on form by setting this.ControlBox=false;