.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error message dialog box

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
HelloWorlddd
732 Views, 4 Replies

Error message dialog box

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

4 REPLIES 4
Message 2 of 5
SENL1362
in reply to: HelloWorlddd

MessageBox.Show("MessageToShow","Title",MessageBoxButton.OKCancel,MessageBoxImage.Error)
Message 3 of 5
HelloWorlddd
in reply to: SENL1362

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

the System is't include the Windows...

Is that mean I need reference some dll?

Message 4 of 5
SENL1362
in reply to: HelloWorlddd

Probably PresentationFramework.dll (and PresentationCore.dll)

 

Clipboard-1.png

Message 5 of 5
HelloWorlddd
in reply to: SENL1362

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost