Get image from MessageBoxIcon

R

Rui Oliveira

I want use icons available in MessageBoxIcon to use them in a PictureBox
control.

How can I do this?

There are a way to get this icons from MessageBoxIcon, or I need to have
this images saved in a files to use them in a PictureBox control?

Thks,
Rui Oliveira
 
I

Ignacio Machin ( .NET/ C# MVP )

I want use icons available in MessageBoxIcon to use them in a PictureBox
control.

How can I do this?

There are a way to get this icons from MessageBoxIcon, or I need to have
this images saved in a files to use them in a PictureBox control?

Thks,
Rui Oliveira

Hi,

I do not think you can do that, that is simply an enumerator.
You have two options:
1- Take a peek in the code of MessageBox control and see how/from
where it gets the image from.
2- Copy the image you want and create your own copy of it. You can use
Print Screen, msPaint to sae just the piece you need.
 
I

Ignacio Machin ( .NET/ C# MVP )

Use the SystemIcons class.

Eq.

That is also possible, in this case you would have to convert it to a
bitmap:


myPictureBox.Image = Bitmap.FromHicon(SystemIcons.Hand.Handle);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top