Using shell32.dll icons (from resources)

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

Hi,

I have a custom made error form and wany to show the exclimation mark or red
X icon form shell32.dll in my application. how would i read these resources?
thanks
 
You don't need to read the resources.
You will find that those are already exposed in dotnet as SystemIcons.

MyBitmap = SystemIcons.Exclamation.ToBitmap
MyBitmap = SystemIcons.Error.ToBitmap
 
* "Brian Henry said:
I have a custom made error form and wany to show the exclimation mark or red
X icon form shell32.dll in my application. how would i read these resources?

My FAQ:

For the system icons:

Have a look at the 'SystemIcons' class.

For the system sounds:

\\\
Private Declare Auto Function MessageBeep Lib "user32.dll" ( _
ByVal wType As Int32 _
) As Boolean

Private Const MB_ICONASTERISK As Int32 = &H40 ' Information.
Private Const MB_ICONEXCLAMATION As Int32 = &H30 ' Ausrufezeichen.
Private Const MB_ICONHAND As Int32 = &H10 ' Stopschild.
Private Const MB_ICONQUESTION As Int32 = &H20 ' Fragezeichen.
Private Const MB_OK As Int32 = &H0 ' Standard-OK.
///

Usage:

\\\
MessageBeep(MB_ICONHAND)
///

Notice that Windows' messagebox supports copying its contents to the
clipboard by pressing Ctrl+C.
 
Notice that Windows' messagebox supports copying its contents to the
clipboard by pressing Ctrl+C.

Thanks for the info! I wasn't aware of that... :S

André Nogueira
 
thanks for the additional information!

Herfried K. Wagner said:
resources?

My FAQ:

For the system icons:

Have a look at the 'SystemIcons' class.

For the system sounds:

\\\
Private Declare Auto Function MessageBeep Lib "user32.dll" ( _
ByVal wType As Int32 _
) As Boolean

Private Const MB_ICONASTERISK As Int32 = &H40 ' Information.
Private Const MB_ICONEXCLAMATION As Int32 = &H30 ' Ausrufezeichen.
Private Const MB_ICONHAND As Int32 = &H10 ' Stopschild.
Private Const MB_ICONQUESTION As Int32 = &H20 ' Fragezeichen.
Private Const MB_OK As Int32 = &H0 ' Standard-OK.
///

Usage:

\\\
MessageBeep(MB_ICONHAND)
///

Notice that Windows' messagebox supports copying its contents to the
clipboard by pressing Ctrl+C.
 
Back
Top