3
Reply

How to Enable close button of message box window in C# ?

rahul ameta

rahul ameta

Dec 24 2012 6:13 AM
6.1k

Hi all,

        I want to enable close button of  message box window .I am trying this code  but close button is not enable.


if (MessageBox.Show("Do you want to close this window?", "Confirmation"MessageBoxButton.YesNo) == MessageBoxResult.Yes)

{

    // Close the window

}

else

{

    // Do not close the window

}






  Thanks 

Aniruddha



Answers (3)