.NET

Reply
Valued Contributor
HelloWorlddd
Posts: 87
Registered: ‎05-03-2013
Message 1 of 5 (201 Views)
Accepted Solution

Error message dialog box

201 Views, 4 Replies
12-27-2013 12:48 AM

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

Probably PresentationFramework.dll (and PresentationCore.dll)

 

Clipboard-1.png

Mentor
SENL1362
Posts: 181
Registered: ‎07-20-2011
Message 2 of 5 (180 Views)

Re: Error message dialog box

12-27-2013 03:31 AM in reply to: HelloWorlddd
MessageBox.Show("MessageToShow","Title",MessageBoxButton.OKCancel,MessageBoxImage.Error)
Valued Contributor
HelloWorlddd
Posts: 87
Registered: ‎05-03-2013
Message 3 of 5 (176 Views)

Re: Error message dialog box

12-27-2013 04:27 AM 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?

Mentor
SENL1362
Posts: 181
Registered: ‎07-20-2011
Message 4 of 5 (170 Views)

Re: Error message dialog box

12-27-2013 04:37 AM in reply to: HelloWorlddd

Probably PresentationFramework.dll (and PresentationCore.dll)

 

Clipboard-1.png

Valued Contributor
HelloWorlddd
Posts: 87
Registered: ‎05-03-2013
Message 5 of 5 (163 Views)

Re: Error message dialog box

12-27-2013 05:54 AM 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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.