Custom MessageBox

  • Thread starter Thread starter Mystique
  • Start date Start date
M

Mystique

Is there any way to use the MessageBoxIcons for a custom MessageBox instead
of importing icons/bitmaps to the project?
 
Mystique,

Frankly, I don't know if there is a managed solution for this, but if there
is not you can use P\Invoke to get those icons calling LoadIcon API finction

to load an icon in Win32 application you can do

HICON hIcon = LoadIcon(NULL, IDI_EXCLAMATION);

once you get the HICON handle you can do

Icon icon = Icon.FromHandle(hIcon);

to create an Icon object
 
Yeah little bit late :-) SystemIcons is the managed solution. Just ignore my
previous post
 
Back
Top