M Mystique Feb 18, 2004 #1 Is there any way to use the MessageBoxIcons for a custom MessageBox instead of importing icons/bitmaps to the project?
Is there any way to use the MessageBoxIcons for a custom MessageBox instead of importing icons/bitmaps to the project?
H Herfried K. Wagner [MVP] Feb 18, 2004 #2 * "Mystique said: Is there any way to use the MessageBoxIcons for a custom MessageBox instead of importing icons/bitmaps to the project? Click to expand... For system icons, have a look at the 'SystemIcons' class. For the sounds, you can use p/invoke on 'MessageBeep': <http://groups.google.com/groups?selm=um#[email protected]>
* "Mystique said: Is there any way to use the MessageBoxIcons for a custom MessageBox instead of importing icons/bitmaps to the project? Click to expand... For system icons, have a look at the 'SystemIcons' class. For the sounds, you can use p/invoke on 'MessageBeep': <http://groups.google.com/groups?selm=um#[email protected]>
S Stoitcho Goutsev \(100\) [C# MVP] Feb 18, 2004 #3 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
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
S Stoitcho Goutsev \(100\) [C# MVP] Feb 18, 2004 #4 Yeah little bit late SystemIcons is the managed solution. Just ignore my previous post