Change the Ok button to a Close ('X') button for a Modal Dialog

  • Thread starter Thread starter NAVMED
  • Start date Start date
N

NAVMED

I'm showing a Modal dialog using ShowDialog(). I need the "OK" button on the
top right to be the Cancel button. It's counter-intuitive to have to click
"Ok" when you want to Cancel. How can I change the "Ok" button to "X"?

I know that I can use Show() instead of ShowDialog(), which will show the
"X" button, but the dialog is no longer modal and the behaviour is very
different from what I want. I cannot use the soft menus at the bottom either,
as they're already used.
 
The "X" doesn't mean cancel - it means minimize. It may not be intuitive but
the OK is standard for close.
 
I guess you could remove all buttons from the caption bar and create OK and
Cancel buttons, or just a Cancel button, in the body of the form.

Paul T.
 
Good point, Paul, similar to a MessageBox.

--

Ginny Caughey
Device Application Development MVP



"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:#[email protected]...
 
In such a case, I create an OK and Cancel softkeys menu items.

My 2-cents,

Serge.
http://www.apptranslator.com - Localization tool for your applications


Ginny Caughey MVP said:
Good point, Paul, similar to a MessageBox.

--

Ginny Caughey
Device Application Development MVP



"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:#[email protected]...
I guess you could remove all buttons from the caption bar and create OK
and Cancel buttons, or just a Cancel button, in the body of the form.

Paul T.
 
Back
Top