Hi,
I am working with a windows forms application in VC# and visual studio 2005
I am showing a message box within an button click event
string messageBoxText = "Click OK to save your changes\n"; string caption = "Confirm Changes"; MessageBoxButtons button = MessageBoxButtons.OKCancel; //Display the MessageBox MessageBox.Show(messageBoxText, caption, button);
MessageBoxResult result = MessageBox.Show(messageBoxText, caption, button); The following error pops up on compilation:
Error 1 The type or namespace name 'MessageBoxResult' could not be found (are you missing a using directive or an assembly reference?)
Also intellisense does not show any such thing as MessageBoxResult. I have seen this statement on msdn. Any help on how to capture the response of message (OK/Cancel) without using MessageBoxResult ?
Thanks.