Get image from MessageBoxIcon

  • Thread starter Thread starter Rui Oliveira
  • Start date Start date
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 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.
 
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);
 
Back
Top