[DefaultEvent("Load"), InitializationEvent("Load"), ComVisible(true), ClassInterface(ClassInterfaceType.AutoDispatch), ToolboxItemFilter("System.Windows.Forms.Control.TopLevel"), ToolboxItem(false), DesignTimeVisible(false), Designer("System.Windows.Forms.Design.FormDocumentDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(IRootDesigner)), DesignerCategory("Form")]
public class Form : ContainerControl
{
// Fields
private Size autoScaleBaseSize;
private CloseReason closeReason;
private MdiClient ctlClient;
private static Icon defaultIcon;
private static Icon defaultRestrictedIcon;
private DialogResult dialogResult;
private static readonly object EVENT_ACTIVATED;
private static readonly object EVENT_CLOSED;
private static readonly object EVENT_CLOSING;
private static readonly object EVENT_DEACTIVATE;
private static readonly object EVENT_FORMCLOSED;
private static readonly object EVENT_FORMCLOSING;
private static readonly object EVENT_HELPBUTTONCLICKED;
private static readonly object EVENT_INPUTLANGCHANGE;
private static readonly object EVENT_INPUTLANGCHANGEREQUEST;
private static readonly object EVENT_LOAD;
private static readonly object EVENT_MAXIMIZEDBOUNDSCHANGED;
private static readonly object EVENT_MAXIMUMSIZECHANGED;
private static readonly object EVENT_MDI_CHILD_ACTIVATE;
private static readonly object EVENT_MENUCOMPLETE;
private static readonly object EVENT_MENUSTART;
private static readonly object EVENT_MINIMUMSIZECHANGED;
private static readonly object EVENT_RESIZEBEGIN;
private static readonly object EVENT_RESIZEEND;
private static readonly object EVENT_RIGHTTOLEFTLAYOUTCHANGED;
private static readonly object EVENT_SHOWN;
private static Padding FormPadding;
private BitVector32 formState;
private static readonly BitVector32.Section FormStateAllowTransparency;
private static readonly BitVector32.Section FormStateAutoScaling;
private static readonly BitVector32.Section FormStateBorderStyle;
private static readonly BitVector32.Section FormStateControlBox;
private BitVector32 formStateEx;
private static readonly BitVector32.Section FormStateExAutoSize;
private static readonly BitVector32.Section FormStateExCalledClosing;
private static readonly BitVector32.Section FormStateExCalledCreateControl;
private static readonly BitVector32.Section FormStateExCalledMakeVisible;
private static readonly BitVector32.Section FormStateExCalledOnLoad;
private static readonly BitVector32.Section FormStateExInModalSizingLoop;
private static readonly BitVector32.Section FormStateExInScale;
private static readonly BitVector32.Section FormStateExInUpdateMdiControlStrip;
private static readonly BitVector32.Section FormStateExMnemonicProcessed;
private static readonly BitVector32.Section FormStateExSettingAutoScale;
private static readonly BitVector32.Section FormStateExShowIcon;
private static readonly BitVector32.Section FormStateExUpdateMenuHandlesDeferred;
private static readonly BitVector32.Section FormStateExUpdateMenuHandlesSuspendCount;
private static readonly BitVector32.Section FormStateExUseMdiChildProc;
private static readonly BitVector32.Section FormStateExWindowBoundsHeightIsClientSize;
private static readonly BitVector32.Section FormStateExWindowBoundsWidthIsClientSize;
private static readonly BitVector32.Section FormStateExWindowClosing;
private static readonly BitVector32.Section FormStateHelpButton;
private static readonly BitVector32.Section FormStateIconSet;
private static readonly BitVector32.Section FormStateIsActive;
private static readonly BitVector32.Section FormStateIsRestrictedWindow;
private static readonly BitVector32.Section FormStateIsRestrictedWindowChecked;
private static readonly BitVector32.Section FormStateIsTextEmpty;
private static readonly BitVector32.Section FormStateIsWindowActivated;
private static readonly BitVector32.Section FormStateKeyPreview;
private static readonly BitVector32.Section FormStateLayered;
private static readonly BitVector32.Section FormStateMaximizeBox;
private static readonly BitVector32.Section FormStateMdiChildMax;
private static readonly BitVector32.Section FormStateMinimizeBox;
private static readonly BitVector32.Section FormStateRenderSizeGrip;
private static readonly BitVector32.Section FormStateSetClientSize;
private static readonly BitVector32.Section FormStateShowWindowOnCreate;
private static readonly BitVector32.Section FormStateSizeGripStyle;
private static readonly BitVector32.Section FormStateStartPos;
private static readonly BitVector32.Section FormStateSWCalled;
private static readonly BitVector32.Section FormStateTaskBar;
private static readonly BitVector32.Section FormStateTopMost;
private static readonly BitVector32.Section FormStateWindowState;
private Icon icon;
private static object internalSyncObject;
private Size minAutoSize;
private NativeWindow ownerWindow;
private static readonly int PropAcceptButton;
private static readonly int PropActiveMdiChild;
private static readonly int PropCancelButton;
private static readonly int PropCurMenu;
private static readonly int PropDefaultButton;
private static readonly int PropDialogOwner;
private static readonly int PropDummyMenu;
private static readonly int PropFormerlyActiveMdiChild;
private static readonly int PropFormMdiParent;
private static readonly int PropMainMenu;
private static readonly int PropMainMenuStrip;
private static readonly int PropMaximizedBounds;
private static readonly int PropMaxTrackSizeHeight;
private static readonly int PropMaxTrackSizeWidth;
private static readonly int PropMdiChildFocusable;
private static readonly int PropMdiControlStrip;
private static readonly int PropMdiWindowListStrip;
private static readonly int PropMergedMenu;
private static readonly int PropMinTrackSizeHeight;
private static readonly int PropMinTrackSizeWidth;
private static readonly int PropOpacity;
private static readonly int PropOwnedForms;
private static readonly int PropOwnedFormsCount;
private static readonly int PropOwner;
private static readonly int PropSecurityTip;
private static readonly int PropTransparencyKey;
private Rectangle restoreBounds;
private Rectangle restoredWindowBounds;
private BoundsSpecified restoredWindowBoundsSpecified;
private bool rightToLeftLayout;
private string securitySite;
private string securityZone;
private VisualStyleRenderer sizeGripRenderer;
private const int SizeGripSize = 0x10;
private Icon smallIcon;
private string userWindowText;
// Events
[SRCategory("CatFocus"), SRDescription("FormOnActivateDescr")]
public event EventHandler Activated;
[EditorBrowsable(EditorBrowsableState.Always), SRDescription("ControlOnAutoSizeChangedDescr"), Browsable(true), SRCategory("CatPropertyChanged")]
public event EventHandler AutoSizeChanged;
[EditorBrowsable(EditorBrowsableState.Always), Browsable(true)]
public event EventHandler AutoValidateChanged;
[SRCategory("CatBehavior"), EditorBrowsable(EditorBrowsableState.Never), SRDescription("FormOnClosedDescr"), Browsable(false)]
public event EventHandler Closed;
[SRCategory("CatBehavior"), EditorBrowsable(EditorBrowsableState.Never), SRDescription("FormOnClosingDescr"), Browsable(false)]
public event CancelEventHandler Closing;
[SRDescription("FormOnDeactivateDescr"), SRCategory("CatFocus")]
public event EventHandler Deactivate;
[SRCategory("CatBehavior"), SRDescription("FormOnFormClosedDescr")]
public event FormClosedEventHandler FormClosed;
[SRDescription("FormOnFormClosingDescr"), SRCategory("CatBehavior")]
public event FormClosingEventHandler FormClosing;
[SRDescription("FormHelpButtonClickedDescr"), EditorBrowsable(EditorBrowsableState.Always), Browsable(true), SRCategory("CatBehavior")]
public event CancelEventHandler HelpButtonClicked;
[SRDescription("FormOnInputLangChangeDescr"), SRCategory("CatBehavior")]
public event InputLanguageChangedEventHandler InputLanguageChanged;
[SRCategory("CatBehavior"), SRDescription("FormOnInputLangChangeRequestDescr")]
public event InputLanguageChangingEventHandler InputLanguageChanging;
[SRDescription("FormOnLoadDescr"), SRCategory("CatBehavior")]
public event EventHandler Load;
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public event EventHandler MarginChanged;
[SRCategory("CatPropertyChanged"), SRDescription("FormOnMaximizedBoundsChangedDescr")]
public event EventHandler MaximizedBoundsChanged;
[SRCategory("CatPropertyChanged"), SRDescription("FormOnMaximumSizeChangedDescr")]
public event EventHandler MaximumSizeChanged;
[SRDescription("FormOnMDIChildActivateDescr"), SRCategory("CatLayout")]
public event EventHandler MdiChildActivate;
[Browsable(false), SRCategory("CatBehavior"), SRDescription("FormOnMenuCompleteDescr")]
public event EventHandler MenuComplete;
[Browsable(false), SRDescription("FormOnMenuStartDescr"), SRCategory("CatBehavior")]
public event EventHandler MenuStart;
[SRCategory("CatPropertyChanged"), SRDescription("FormOnMinimumSizeChangedDescr")]
public event EventHandler MinimumSizeChanged;
[SRDescription("FormOnResizeBeginDescr"), SRCategory("CatAction")]
public event EventHandler ResizeBegin;
[SRCategory("CatAction"), SRDescription("FormOnResizeEndDescr")]
public event EventHandler ResizeEnd;
[SRCategory("CatPropertyChanged"), SRDescription("ControlOnRightToLeftLayoutChangedDescr")]
public event EventHandler RightToLeftLayoutChanged;
[SRCategory("CatBehavior"), SRDescription("FormOnShownDescr")]
public event EventHandler Shown;
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler TabIndexChanged;
[EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public event EventHandler TabStopChanged;
// Methods
static Form();
public Form();
public void Activate();
protected void ActivateMdiChild(Form form);
private void ActivateMdiChildInternal(Form form);
public void AddOwnedForm(Form ownedForm);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void AdjustFormScrollbars(bool displayScrollbars);
private float AdjustScale(float scale);
private void AdjustSystemMenu();
private void AdjustSystemMenu(IntPtr hmenu);
internal override void AfterControlRemoved(Control control, Control oldParent);
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("This method has been deprecated. Use the ApplyAutoScaling method instead. http://go.microsoft.com/fwlink/?linkid=14202")]
protected void ApplyAutoScaling();
internal override Rectangle ApplyBoundsConstraints(int suggestedX, int suggestedY, int proposedWidth, int proposedHeight);
private void ApplyClientSize();
internal override void AssignParent(Control value);
private void CallShownEvent();
internal override bool CanProcessMnemonic();
internal bool CanRecreateHandle();
internal override bool CanSelectCore();
protected void CenterToParent();
protected void CenterToScreen();
internal bool CheckCloseDialog(bool closingOnly);
public void Close();
private Size ComputeWindowSize(Size clientSize);
private Size ComputeWindowSize(Size clientSize, int style, int exStyle);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override Control.ControlCollection CreateControlsInstance();
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void CreateHandle();
private void DeactivateMdiChild();
[EditorBrowsable(EditorBrowsableState.Advanced), SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
protected override void DefWndProc(ref Message m);
protected override void Dispose(bool disposing);
private void EnsureSecurityInformation();
private void FillInCreateParamsBorderIcons(CreateParams cp);
private void FillInCreateParamsBorderStyles(CreateParams cp);
private void FillInCreateParamsStartPosition(CreateParams cp);
private void FillInCreateParamsWindowState(CreateParams cp);
private static Type FindClosestStockType(Type type);
internal override bool FocusInternal();
[Obsolete("This method has been deprecated. Use the AutoScaleDimensions property instead. http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Never)]
public static SizeF GetAutoScaleSize(Font font);
internal override Size GetPreferredSizeCore(Size proposedSize);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override Rectangle GetScaledBounds(Rectangle bounds, SizeF factor, BoundsSpecified specified);
private void InvalidateMergedMenu();
public void LayoutMdi(MdiLayout value);
internal void MenuChanged(int change, Menu menu);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnActivated(EventArgs e);
internal override void OnAutoScaleModeChanged();
protected override void OnBackgroundImageChanged(EventArgs e);
protected override void OnBackgroundImageLayoutChanged(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnClosed(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnClosing(CancelEventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnCreateControl();
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnDeactivate(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnEnabledChanged(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnEnter(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnFontChanged(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnFormClosed(FormClosedEventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnFormClosing(FormClosingEventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnHandleCreated(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnHandleDestroyed(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnHelpButtonClicked(CancelEventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnInputLanguageChanged(InputLanguageChangedEventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnInputLanguageChanging(InputLanguageChangingEventArgs e);
protected override void OnLayout(LayoutEventArgs levent);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnLoad(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnMaximizedBoundsChanged(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnMaximumSizeChanged(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnMdiChildActivate(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnMenuComplete(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnMenuStart(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnMinimumSizeChanged(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnPaint(PaintEventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnResize(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnResizeBegin(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnResizeEnd(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnRightToLeftLayoutChanged(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void OnShown(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnStyleChanged(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnTextChanged(EventArgs e);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void OnVisibleChanged(EventArgs e);
internal void PerformOnInputLanguageChanged(InputLanguageChangedEventArgs iplevent);
internal void PerformOnInputLanguageChanging(InputLanguageChangingEventArgs iplcevent);
[SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
protected override bool ProcessCmdKey(ref Message msg, Keys keyData);
[EditorBrowsable(EditorBrowsableState.Advanced), UIPermission(SecurityAction.LinkDemand, Window=UIPermissionWindow.AllWindows)]
protected override bool ProcessDialogChar(char charCode);
[UIPermission(SecurityAction.LinkDemand, Window=UIPermissionWindow.AllWindows)]
protected override bool ProcessDialogKey(Keys keyData);
[SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
protected override bool ProcessKeyPreview(ref Message m);
[UIPermission(SecurityAction.LinkDemand, Window=UIPermissionWindow.AllWindows)]
protected internal override bool ProcessMnemonic(char charCode);
[UIPermission(SecurityAction.LinkDemand, Window=UIPermissionWindow.AllWindows)]
protected override bool ProcessTabKey(bool forward);
internal void RaiseFormClosedOnAppExit();
internal bool RaiseFormClosingOnAppExit();
internal override void RecreateHandleCore();
public void RemoveOwnedForm(Form ownedForm);
private void ResetIcon();
private void ResetSecurityTip(bool modalOnly);
private void ResetTransparencyKey();
private void ResolveZoneAndSiteNames(ArrayList sites, ref string securityZone, ref string securitySite);
private void RestoreWindowBoundsIfNecessary();
private void RestrictedProcessNcActivate();
private string RestrictedWindowText(string original);
private void ResumeLayoutFromMinimize();
private void ResumeUpdateMenuHandles();
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void ScaleControl(SizeF factor, BoundsSpecified specified);
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void ScaleCore(float x, float y);
protected override void Select(bool directed, bool forward);
private void SelectInternal(bool directed, bool forward);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void SetClientSizeCore(int x, int y);
private void SetDefaultButton(IButtonControl button);
public void SetDesktopBounds(int x, int y, int width, int height);
public void SetDesktopLocation(int x, int y);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected override void SetVisibleCore(bool value);
[EditorBrowsable(EditorBrowsableState.Never)]
internal virtual bool ShouldSerializeAutoScaleBaseSize();
private bool ShouldSerializeClientSize();
private bool ShouldSerializeIcon();
[EditorBrowsable(EditorBrowsableState.Never)]
private bool ShouldSerializeLocation();
[EditorBrowsable(EditorBrowsableState.Never)]
internal override bool ShouldSerializeSize();
[EditorBrowsable(EditorBrowsableState.Never)]
internal bool ShouldSerializeTransparencyKey();
public void Show(IWin32Window owner);
public DialogResult ShowDialog();
public DialogResult ShowDialog(IWin32Window owner);
private void SuspendLayoutForMinimize();
private void SuspendUpdateMenuHandles();
public override string ToString();
private void UpdateAutoScaleBaseSize();
protected override void UpdateDefaultButton();
internal void UpdateFormStyles();
private void UpdateHandleWithOwner();
private void UpdateLayered();
private void UpdateMdiControlStrip(bool maximized);
internal void UpdateMdiWindowListStrip();
private void UpdateMenuHandles();
private void UpdateMenuHandles(MainMenu menu, bool forceRedraw);
private void UpdateRenderSizeGrip();
private void UpdateToolStrip();
private void UpdateWindowIcon(bool redrawFrame);
private void UpdateWindowState();
[EditorBrowsable(EditorBrowsableState.Always), Browsable(true)]
public override bool ValidateChildren();
[EditorBrowsable(EditorBrowsableState.Always), Browsable(true)]
public override bool ValidateChildren(ValidationConstraints validationConstraints);
private void WmActivate(ref Message m);
private void WmClose(ref Message m);
private void WmCreate(ref Message m);
private void WmEnterMenuLoop(ref Message m);
private void WmEnterSizeMove(ref Message m);
private void WmEraseBkgnd(ref Message m);
private void WmExitMenuLoop(ref Message m);
private void WmExitSizeMove(ref Message m);
private void WmGetMinMaxInfo(ref Message m);
private void WmGetMinMaxInfoHelper(ref Message m, Size minTrack, Size maxTrack, Rectangle maximizedBounds);
private void WmInitMenuPopup(ref Message m);
private void WmMdiActivate(ref Message m);
private void WmMenuChar(ref Message m);
private void WmNcButtonDown(ref Message m);
private void WmNCDestroy(ref Message m);
private void WmNCHitTest(ref Message m);
private void WmShowWindow(ref Message m);
private void WmSize(ref Message m);
private void WmSysCommand(ref Message m);
private void WmUnInitMenuPopup(ref Message m);
private void WmWindowPosChanged(ref Message m);
[EditorBrowsable(EditorBrowsableState.Advanced), SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
protected override void WndProc(ref Message m);
// Properties
[DefaultValue((string) null), SRDescription("FormAcceptButtonDescr")]
public IButtonControl AcceptButton { get; set; }
internal bool Active { get; set; }
public static Form ActiveForm { get; }
[SRDescription("FormActiveMDIChildDescr"), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public Form ActiveMdiChild { get; }
internal Form ActiveMdiChildInternal { get; set; }
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), SRDescription("ControlAllowTransparencyDescr"), Browsable(false)]
public bool AllowTransparency { get; set; }
[SRDescription("FormAutoScaleDescr"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Obsolete("This property has been deprecated. Use the AutoScaleMode property instead. http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Never), SRCategory("CatLayout"), Browsable(false)]
public bool AutoScale { get; set; }
[EditorBrowsable(EditorBrowsableState.Never), Localizable(true), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public virtual Size AutoScaleBaseSize { get; set; }
[Localizable(true)]
public override bool AutoScroll { get; set; }
[Browsable(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible), EditorBrowsable(EditorBrowsableState.Always)]
public override bool AutoSize { get; set; }
[SRDescription("ControlAutoSizeModeDescr"), Localizable(true), SRCategory("CatLayout"), Browsable(true), DefaultValue(1)]
public AutoSizeMode AutoSizeMode { get; set; }
[Browsable(true), EditorBrowsable(EditorBrowsableState.Always)]
public override AutoValidate AutoValidate { get; set; }
public override Color BackColor { get; set; }
private bool CalledClosing { get; set; }
private bool CalledCreateControl { get; set; }
private bool CalledMakeVisible { get; set; }
private bool CalledOnLoad { get; set; }
[DefaultValue((string) null), SRDescription("FormCancelButtonDescr")]
public IButtonControl CancelButton { get; set; }
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible), Localizable(true)]
public Size ClientSize { get; set; }
internal CloseReason CloseReason { get; set; }
[DefaultValue(true), SRCategory("CatWindowStyle"), SRDescription("FormControlBoxDescr")]
public bool ControlBox { get; set; }
protected override CreateParams CreateParams { [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)] get; }
internal static Icon DefaultIcon { get; }
protected override ImeMode DefaultImeMode { get; }
private static Icon DefaultRestrictedIcon { get; }
protected override Size DefaultSize { get; }
[Browsable(false), SRCategory("CatLayout"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), SRDescription("FormDesktopBoundsDescr")]
public Rectangle DesktopBounds { get; set; }
[SRDescription("FormDesktopLocationDescr"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false), SRCategory("CatLayout")]
public Point DesktopLocation { get; set; }
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), SRDescription("FormDialogResultDescr"), SRCategory("CatBehavior")]
public DialogResult DialogResult { get; set; }
[SRDescription("FormBorderStyleDescr"), SRCategory("CatAppearance"), DefaultValue(4), DispId(-504)]
public FormBorderStyle FormBorderStyle { get; set; }
private Form FormerlyActiveMdiChild { get; set; }
internal override bool HasMenu { get; }
[DefaultValue(false), SRDescription("FormHelpButtonDescr"), SRCategory("CatWindowStyle")]
public bool HelpButton { get; set; }
[SRDescription("FormIconDescr"), Localizable(true), AmbientValue((string) null), SRCategory("CatWindowStyle")]
public Icon Icon { get; set; }
private bool IsClosing { get; set; }
private bool IsMaximized { get; }
[SRCategory("CatWindowStyle"), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), SRDescription("FormIsMDIChildDescr")]
public bool IsMdiChild { get; }
internal bool IsMdiChildFocusable { get; set; }
[SRCategory("CatWindowStyle"), SRDescription("FormIsMDIContainerDescr"), DefaultValue(false)]
public bool IsMdiContainer { get; set; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced)]
public bool IsRestrictedWindow { get; }
[SRDescription("FormKeyPreviewDescr"), DefaultValue(false)]
public bool KeyPreview { get; set; }
[SettingsBindable(true)]
public Point Location { get; set; }
[SRCategory("CatWindowStyle"), TypeConverter(typeof(ReferenceConverter)), DefaultValue((string) null), SRDescription("FormMenuStripDescr")]
public MenuStrip MainMenuStrip { get; set; }
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public Padding Margin { get; set; }
[DefaultValue(true), SRDescription("FormMaximizeBoxDescr"), SRCategory("CatWindowStyle")]
public bool MaximizeBox { get; set; }
protected Rectangle MaximizedBounds { get; set; }
[SRCategory("CatLayout"), Localizable(true), SRDescription("FormMaximumSizeDescr"), RefreshProperties(RefreshProperties.Repaint), DefaultValue(typeof(Size), "0, 0")]
public override Size MaximumSize { get; set; }
[SRDescription("FormMDIChildrenDescr"), SRCategory("CatWindowStyle"), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public Form[] MdiChildren { get; }
internal MdiClient MdiClient { get; }
private MdiControlStrip MdiControlStrip { get; set; }
[SRCategory("CatWindowStyle"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), SRDescription("FormMDIParentDescr"), Browsable(false)]
public Form MdiParent { get; set; }
private Form MdiParentInternal { get; set; }
private MdiWindowListStrip MdiWindowListStrip { get; set; }
[DefaultValue((string) null), Browsable(false), SRCategory("CatWindowStyle"), SRDescription("FormMenuDescr"), TypeConverter(typeof(ReferenceConverter))]
public MainMenu Menu { get; set; }
[SRDescription("FormMergedMenuDescr"), EditorBrowsable(EditorBrowsableState.Advanced), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), SRCategory("CatWindowStyle"), Browsable(false)]
public MainMenu MergedMenu { [UIPermission(SecurityAction.Demand, Window=UIPermissionWindow.AllWindows)] get; }
private MainMenu MergedMenuPrivate { get; }
[DefaultValue(true), SRDescription("FormMinimizeBoxDescr"), SRCategory("CatWindowStyle")]
public bool MinimizeBox { get; set; }
[SRCategory("CatLayout"), RefreshProperties(RefreshProperties.Repaint), SRDescription("FormMinimumSizeDescr"), Localizable(true)]
public override Size MinimumSize { get; set; }
[SRDescription("FormModalDescr"), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), SRCategory("CatWindowStyle")]
public bool Modal { get; }
[SRCategory("CatWindowStyle"), TypeConverter(typeof(OpacityConverter)), SRDescription("FormOpacityDescr"), DefaultValue((double) 1.0)]
public double Opacity { get; set; }
private byte OpacityAsByte { get; }
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), SRCategory("CatWindowStyle"), SRDescription("FormOwnedFormsDescr"), Browsable(false)]
public Form[] OwnedForms { get; }
[SRCategory("CatWindowStyle"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false), SRDescription("FormOwnerDescr")]
public Form Owner { get; set; }
internal Form OwnerInternal { get; }
internal override Control ParentInternal { get; set; }
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
public Rectangle RestoreBounds { get; }
[SRDescription("ControlRightToLeftLayoutDescr"), SRCategory("CatAppearance"), Localizable(true), DefaultValue(false)]
public virtual bool RightToLeftLayout { get; set; }
[SRCategory("CatWindowStyle"), SRDescription("FormShowIconDescr"), DefaultValue(true)]
public bool ShowIcon { get; set; }
[DefaultValue(true), SRCategory("CatWindowStyle"), SRDescription("FormShowInTaskbarDescr")]
public bool ShowInTaskbar { get; set; }
internal override int ShowParams { get; }
[Browsable(false)]
protected virtual bool ShowWithoutActivation { get; }
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Localizable(false)]
public Size Size { get; set; }
[SRCategory("CatWindowStyle"), SRDescription("FormSizeGripStyleDescr"), DefaultValue(0)]
public SizeGripStyle SizeGripStyle { get; set; }
[SRCategory("CatLayout"), SRDescription("FormStartPositionDescr"), Localizable(true), DefaultValue(2)]
public FormStartPosition StartPosition { get; set; }
[EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
public int TabIndex { get; set; }
[DispId(-516), SRCategory("CatBehavior"), Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(true), SRDescription("ControlTabStopDescr")]
public bool TabStop { get; set; }
private HandleRef TaskbarOwner { get; }
[SettingsBindable(true)]
public override string Text { get; set; }
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced)]
public bool TopLevel { get; set; }
[SRDescription("FormTopMostDescr"), SRCategory("CatWindowStyle"), DefaultValue(false)]
public bool TopMost { get; set; }
[SRCategory("CatWindowStyle"), SRDescription("FormTransparencyKeyDescr")]
public Color TransparencyKey { get; set; }
[DefaultValue(0), SRCategory("CatLayout"), SRDescription("FormWindowStateDescr")]
public FormWindowState WindowState { get; set; }
internal override string WindowText { get; set; }
// Nested Types
[ComVisible(false)]
public class ControlCollection : Control.ControlCollection
{
// Fields
private Form owner;
// Methods
public ControlCollection(Form owner);
public override void Add(Control value);
public override void Remove(Control value);
}
private class EnumThreadWindowsCallback
{
// Fields
private List<HandleRef> ownedWindows;
// Methods
internal EnumThreadWindowsCallback();
internal bool Callback(IntPtr hWnd, IntPtr lParam);
internal void ResetOwners();
internal void SetOwners(HandleRef hRefOwner);
}
private class SecurityToolTip : IDisposable
{
// Fields
private bool first;
private Form owner;
private string toolTipText;
private ToolTipNativeWindow window;
// Methods
internal SecurityToolTip(Form owner);
public void Dispose();
private void FormHandleCreated(object sender, EventArgs e);
private void FormLocationChanged(object sender, EventArgs e);
private NativeMethods.TOOLINFO_T GetTOOLINFO();
internal void Pop(bool noLongerFirst);
private void RecreateHandle();
private void SetupText();
private void SetupToolTip();
internal void Show();
private void WndProc(ref Message msg);
// Properties
private CreateParams CreateParams { get; }
internal bool Modal { get; }
// Nested Types
private sealed class ToolTipNativeWindow : NativeWindow
{
// Fields
private Form.SecurityToolTip control;
// Methods
internal ToolTipNativeWindow(Form.SecurityToolTip control);
protected override void WndProc(ref Message m);
}
}
}
|