Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / CommonUI / System / Drawing / SystemIcons.cs / 1 / SystemIcons.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Drawing {
using System.Diagnostics;
using System;
///
///
/// Icon objects for Windows system-wide icons.
///
public sealed class SystemIcons {
private static Icon _application ;
private static Icon _asterisk ;
private static Icon _error ;
private static Icon _exclamation ;
private static Icon _hand ;
private static Icon _information ;
private static Icon _question ;
private static Icon _warning ;
private static Icon _winlogo ;
private static Icon _shield ;
// not creatable...
//
private SystemIcons() {
}
///
///
/// Icon is the default Application icon. (WIN32: IDI_APPLICATION)
///
public static Icon Application {
get {
if (_application == null)
_application = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_APPLICATION ));
return _application;
}
}
///
///
/// Icon is the system Asterisk icon. (WIN32: IDI_ASTERISK)
///
public static Icon Asterisk {
get {
if (_asterisk== null)
_asterisk = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_ASTERISK ));
return _asterisk;
}
}
///
///
/// Icon is the system Error icon. (WIN32: IDI_ERROR)
///
public static Icon Error {
get {
if (_error == null)
_error = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_ERROR ));
return _error;
}
}
///
///
/// Icon is the system Exclamation icon. (WIN32: IDI_EXCLAMATION)
///
public static Icon Exclamation {
get {
if (_exclamation == null)
_exclamation = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_EXCLAMATION ));
return _exclamation;
}
}
///
///
/// Icon is the system Hand icon. (WIN32: IDI_HAND)
///
public static Icon Hand {
get {
if (_hand == null)
_hand = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_HAND ));
return _hand;
}
}
///
///
/// Icon is the system Information icon. (WIN32: IDI_INFORMATION)
///
public static Icon Information {
get {
if (_information == null)
_information = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_INFORMATION ));
return _information;
}
}
///
///
/// Icon is the system Question icon. (WIN32: IDI_QUESTION)
///
public static Icon Question {
get {
if (_question== null)
_question = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_QUESTION ));
return _question;
}
}
///
///
/// Icon is the system Warning icon. (WIN32: IDI_WARNING)
///
public static Icon Warning {
get {
if (_warning == null)
_warning = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_WARNING ));
return _warning;
}
}
///
///
/// Icon is the Windows Logo icon. (WIN32: IDI_WINLOGO)
///
public static Icon WinLogo {
get {
if (_winlogo == null)
_winlogo = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_WINLOGO ));
return _winlogo;
}
}
///
///
/// Icon is the Windows Shield Icon.
///
public static Icon Shield {
get {
if (_shield == null) {
_shield = new Icon(typeof(SystemIcons), "ShieldIcon.ico");
}
return _shield;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Drawing {
using System.Diagnostics;
using System;
///
///
/// Icon objects for Windows system-wide icons.
///
public sealed class SystemIcons {
private static Icon _application ;
private static Icon _asterisk ;
private static Icon _error ;
private static Icon _exclamation ;
private static Icon _hand ;
private static Icon _information ;
private static Icon _question ;
private static Icon _warning ;
private static Icon _winlogo ;
private static Icon _shield ;
// not creatable...
//
private SystemIcons() {
}
///
///
/// Icon is the default Application icon. (WIN32: IDI_APPLICATION)
///
public static Icon Application {
get {
if (_application == null)
_application = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_APPLICATION ));
return _application;
}
}
///
///
/// Icon is the system Asterisk icon. (WIN32: IDI_ASTERISK)
///
public static Icon Asterisk {
get {
if (_asterisk== null)
_asterisk = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_ASTERISK ));
return _asterisk;
}
}
///
///
/// Icon is the system Error icon. (WIN32: IDI_ERROR)
///
public static Icon Error {
get {
if (_error == null)
_error = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_ERROR ));
return _error;
}
}
///
///
/// Icon is the system Exclamation icon. (WIN32: IDI_EXCLAMATION)
///
public static Icon Exclamation {
get {
if (_exclamation == null)
_exclamation = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_EXCLAMATION ));
return _exclamation;
}
}
///
///
/// Icon is the system Hand icon. (WIN32: IDI_HAND)
///
public static Icon Hand {
get {
if (_hand == null)
_hand = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_HAND ));
return _hand;
}
}
///
///
/// Icon is the system Information icon. (WIN32: IDI_INFORMATION)
///
public static Icon Information {
get {
if (_information == null)
_information = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_INFORMATION ));
return _information;
}
}
///
///
/// Icon is the system Question icon. (WIN32: IDI_QUESTION)
///
public static Icon Question {
get {
if (_question== null)
_question = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_QUESTION ));
return _question;
}
}
///
///
/// Icon is the system Warning icon. (WIN32: IDI_WARNING)
///
public static Icon Warning {
get {
if (_warning == null)
_warning = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_WARNING ));
return _warning;
}
}
///
///
/// Icon is the Windows Logo icon. (WIN32: IDI_WINLOGO)
///
public static Icon WinLogo {
get {
if (_winlogo == null)
_winlogo = new Icon( SafeNativeMethods.LoadIcon( NativeMethods.NullHandleRef, SafeNativeMethods.IDI_WINLOGO ));
return _winlogo;
}
}
///
///
/// Icon is the Windows Shield Icon.
///
public static Icon Shield {
get {
if (_shield == null) {
_shield = new Icon(typeof(SystemIcons), "ShieldIcon.ico");
}
return _shield;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IFormattable.cs
- IteratorAsyncResult.cs
- WebSysDefaultValueAttribute.cs
- DataGridViewCellStateChangedEventArgs.cs
- WeakReferenceEnumerator.cs
- CustomAttribute.cs
- CommonDialog.cs
- ReferencedType.cs
- SQLConvert.cs
- Propagator.Evaluator.cs
- LocalTransaction.cs
- PersianCalendar.cs
- QuaternionKeyFrameCollection.cs
- RenderOptions.cs
- SymDocumentType.cs
- Scene3D.cs
- BaseTemplateCodeDomTreeGenerator.cs
- Stack.cs
- StorageBasedPackageProperties.cs
- VisualBrush.cs
- X509CertificateCollection.cs
- Object.cs
- HtmlButton.cs
- BufferedGraphics.cs
- UserControl.cs
- UTF7Encoding.cs
- ContainerParaClient.cs
- ObsoleteAttribute.cs
- MaskDescriptor.cs
- LinqDataSourceUpdateEventArgs.cs
- MultiPageTextView.cs
- WinEventQueueItem.cs
- ECDiffieHellmanCng.cs
- DefaultTextStoreTextComposition.cs
- MouseButtonEventArgs.cs
- ServiceNameCollection.cs
- TextComposition.cs
- DetailsViewActionList.cs
- FixedTextContainer.cs
- FlowDocumentView.cs
- MetadataUtil.cs
- StringValidator.cs
- SmtpCommands.cs
- KerberosRequestorSecurityToken.cs
- IsolatedStoragePermission.cs
- BaseCAMarshaler.cs
- recordstatefactory.cs
- Int32RectConverter.cs
- HttpProfileGroupBase.cs
- METAHEADER.cs
- CredentialCache.cs
- ToolStripPanelRow.cs
- SqlBulkCopy.cs
- ConfigXmlAttribute.cs
- ApplicationId.cs
- WebPartUserCapability.cs
- GenericIdentity.cs
- WorkflowRuntimeSection.cs
- CqlWriter.cs
- SmtpFailedRecipientsException.cs
- WSHttpBindingBaseElement.cs
- MasterPage.cs
- OuterGlowBitmapEffect.cs
- SupportsEventValidationAttribute.cs
- ValidationHelper.cs
- SettingsPropertyValue.cs
- NetworkInformationException.cs
- HtmlTableRowCollection.cs
- HwndHost.cs
- TextElement.cs
- Configuration.cs
- FrameworkPropertyMetadata.cs
- GridItemProviderWrapper.cs
- ObjectQuery_EntitySqlExtensions.cs
- OrderedParallelQuery.cs
- Context.cs
- TrimSurroundingWhitespaceAttribute.cs
- DataGridViewColumn.cs
- PtsHelper.cs
- unsafenativemethodsother.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- GrammarBuilderWildcard.cs
- CompositeActivityMarkupSerializer.cs
- Debugger.cs
- KeyboardEventArgs.cs
- BitmapDownload.cs
- TriggerActionCollection.cs
- WindowsScrollBar.cs
- TextProperties.cs
- CursorInteropHelper.cs
- EventLogPermissionEntry.cs
- SmtpNetworkElement.cs
- Vector3DValueSerializer.cs
- BaseCodeDomTreeGenerator.cs
- ZipPackagePart.cs
- DictionarySurrogate.cs
- MonthCalendar.cs
- DynamicHyperLink.cs
- ChainedAsyncResult.cs
- ConfigurationManagerHelperFactory.cs