Hi.
I have MessageBox likt that:
MessageBox::Show(S"string1",S"string2", MesageBoxButton::YesNo,
MessageBoxIcon::Error);
How can I get result of pressed button from that MessageBox - I trying to do
something like that:
if(DialogResult::Yes == MessageBox::Show(......))
{
......
}
But whatever I press in MessageBox, 'IF' is always true!
I can change 'DialogResult::Yes' with any numerical value it's still true -
what going on?:)
Thanks for wrote.
Claes Bergefall - 30 Aug 2004 07:49 GMT
The code you have should work.
What does MessageBox::Show return
if you put it on a separate row?
/claes
> Hi.
> I have MessageBox likt that:
[quoted text clipped - 12 lines]
> what going on?:)
> Thanks for wrote.
Herfried K. Wagner [MVP] - 30 Aug 2004 11:29 GMT
* "Przemek" <reference@interia.pl> scripsit:
> I have MessageBox likt that:
> MessageBox::Show(S"string1",S"string2", MesageBoxButton::YesNo,
[quoted text clipped - 3 lines]
> something like that:
> if(DialogResult::Yes == MessageBox::Show(......))
Set a breakpoint and check what value 'MessageBox::Show' returns.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/