Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / PrintDialogDesigner.cs / 1 / PrintDialogDesigner.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Windows.Forms.Design {
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Windows.Forms;
using Microsoft.Win32;
using System.Collections;
using System.Diagnostics;
///
/// This is the designer for PrintDialog components.
///
internal class PrintDialogDesigner : ComponentDesigner {
///
/// This method is called when a component is first initialized, typically after being first added
/// to a design surface. We need to override this since the printDialog when added in Whidbey should set
/// the UseEXDialog == true;
/// UseEXDialog = true means to use the EX versions of the dialogs when running on XP or above, and to ignore the ShowHelp & ShowNetwork properties.
/// If running below XP then UseEXDialog is ignored and the non-EX dialogs are used & ShowHelp & ShowNetwork are respected.
/// UseEXDialog = false means to never use the EX versions of the dialog regardless of which O/S app is running on. ShowHelp & ShowNetwork will work in this case.
///
public override void InitializeNewComponent(IDictionary defaultValues) {
PrintDialog pd = Component as PrintDialog;
Debug.Assert(pd != null, " PrintDialog is null !!");
if (pd != null)
{
pd.UseEXDialog = true;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlUserDefinedTypeAttribute.cs
- SymDocumentType.cs
- SqlNode.cs
- WarningException.cs
- CommandField.cs
- DataObjectMethodAttribute.cs
- FormsAuthenticationTicket.cs
- ActivityDelegate.cs
- WebRequest.cs
- SendKeys.cs
- UnsafeNativeMethods.cs
- COM2FontConverter.cs
- TextComposition.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- ChildChangedEventArgs.cs
- CaseInsensitiveHashCodeProvider.cs
- ToolboxItem.cs
- ListControl.cs
- OperationCanceledException.cs
- XmlParserContext.cs
- NGCSerializer.cs
- tooltip.cs
- Image.cs
- HostedHttpContext.cs
- XmlSchemaSequence.cs
- ArgumentsParser.cs
- DbReferenceCollection.cs
- TabControl.cs
- WorkflowIdleBehavior.cs
- OleAutBinder.cs
- ImageSource.cs
- EntityDataSourceState.cs
- RawStylusInputCustomDataList.cs
- HyperLinkDesigner.cs
- SqlConnection.cs
- Attributes.cs
- DataMemberConverter.cs
- FunctionNode.cs
- HtmlShimManager.cs
- SqlException.cs
- CollectionContainer.cs
- GeometryModel3D.cs
- SettingsPropertyCollection.cs
- SmiGettersStream.cs
- XsltArgumentList.cs
- MessageDesigner.cs
- TextFormatterImp.cs
- EmptyCollection.cs
- objectquery_tresulttype.cs
- BamlTreeMap.cs
- ButtonAutomationPeer.cs
- StatusBar.cs
- COM2IDispatchConverter.cs
- ConnectionStringsSection.cs
- PasswordPropertyTextAttribute.cs
- ListBox.cs
- Switch.cs
- DefaultObjectMappingItemCollection.cs
- ComponentEditorForm.cs
- CodeDelegateCreateExpression.cs
- TreeViewHitTestInfo.cs
- NameSpaceExtractor.cs
- EmbeddedMailObjectsCollection.cs
- TypeSystem.cs
- Trace.cs
- RecordManager.cs
- RIPEMD160.cs
- TargetConverter.cs
- ScriptDescriptor.cs
- FontResourceCache.cs
- HotCommands.cs
- ping.cs
- XmlSignatureManifest.cs
- JsonWriterDelegator.cs
- UriWriter.cs
- SqlTransaction.cs
- Privilege.cs
- RefreshResponseInfo.cs
- RijndaelManaged.cs
- FixedLineResult.cs
- CellLabel.cs
- VerbConverter.cs
- CompiledQueryCacheKey.cs
- XpsFilter.cs
- WebChannelFactory.cs
- WindowsFormsLinkLabel.cs
- _ChunkParse.cs
- InheritanceAttribute.cs
- CreateSequence.cs
- Matrix3D.cs
- ProfileInfo.cs
- DynamicDataExtensions.cs
- WebBrowserSiteBase.cs
- TimeSpan.cs
- PathSegment.cs
- InstallerTypeAttribute.cs
- AnnotationDocumentPaginator.cs
- URLAttribute.cs
- XmlNamedNodeMap.cs
- EventInfo.cs