Error message dialog box

Error message dialog box

Anonymous
Not applicable
1,575 Views
4 Replies
Message 1 of 5

Error message dialog box

Anonymous
Not applicable

I know the general message dialog box, I can achieve by the following code


    Application.ShowAlertDialog (Message);

 

But I want to use the error message dialog box, there is a small red cross in the dialog box, is there anyone know which class is it?

 

Thanks very much

0 Likes
Accepted solutions (1)
1,576 Views
4 Replies
Replies (4)
Message 2 of 5

SENL1362
Advisor
Advisor
MessageBox.Show("MessageToShow","Title",MessageBoxButton.OKCancel,MessageBoxImage.Error)
0 Likes
Message 3 of 5

Anonymous
Not applicable

uh.I just use C#, and program for AutoCAD

the System is't include the Windows...

Is that mean I need reference some dll?

0 Likes
Message 4 of 5

SENL1362
Advisor
Advisor
Accepted solution

Probably PresentationFramework.dll (and PresentationCore.dll)

 

Clipboard-1.png

0 Likes
Message 5 of 5

Anonymous
Not applicable

It's need to reference System.Windows.Forms.dll

Then using System.Windows.Froms namespace

Last, write the following code.

MessageBox.Show("hello", "Caption...",MessageBoxButtons.OK,MessageBoxIcon.Error);

 

Very thanks.

0 Likes