Windows forms form properties

Шаг 3. Настройка свойств формы Step 3: Set your form properties

Далее окно Свойства используется для изменения внешнего вида формы. Next, you use the Properties window to change the way your form looks.

Настройка свойств формы How to set your form properties

Убедитесь, что отображается конструктор Windows Forms. Be sure you’re looking at Windows Forms Designer. В интегрированной среде разработки Visual Studio откройте вкладку Form1.cs [Design] (или вкладку Form1.vb [Design] в Visual Basic). In the Visual Studio integrated development environment (IDE), choose the Form1.cs [Design] tab (or the Form1.vb [Design] tab in Visual Basic).

Чтобы выделить форму Form1, щелкните в любом ее месте. Choose anywhere inside the form Form1 to select it. Посмотрите на окно Свойства. Теперь оно должно отображать свойства формы. Look at the Properties window, which should now be showing the properties for the form. У формы есть различные свойства. Forms have various properties. Например, можно установить цвет переднего плана и фона, текст заголовка, который отображается в верхней части формы, размер формы и другие свойства. For example, you can set the foreground and background color, title text that appears at the top of the form, size of the form, and other properties.

Если окно Свойства не открывается, остановите приложение, нажав квадратную кнопку Остановить отладку на панели инструментов, или просто закройте окно. If the Properties window doesn’t appear, stop your app by choosing the square Stop Debugging button on the toolbar, or just close the window. Если приложение остановлено, но окно Свойства все равно не отображается, в строке меню выберите Вид > Окно свойств. If the app is stopped and you still don’t see the Properties window, on the menu bar, choose View > Properties Window.

Когда форма будет выбрана, найдите свойство Text в окне Свойства. After the form is selected, find the Text property in the Properties window. В зависимости от того, как отсортирован список, может потребоваться прокрутить вниз. Depending on how the list is sorted, you might need to scroll down. Выберите Text, введите Программа просмотра изображений, а затем нажмите клавишу ВВОД. Choose Text, type Picture Viewer, and then choose Enter. Теперь форма должна содержать текст Программа просмотра изображений в заголовке окна. Окно Свойства должно выглядеть так, как показано на снимке экрана ниже. Your form should now have the text Picture Viewer in its title bar, and the Properties window should look similar to the following screenshot.


**Окно* _ _»Свойства» **Properties* _ _window

Свойства можно упорядочить по категориям или в алфавитном порядке. Properties can be ordered by a Categorized or Alphabetical view. Вы можете переключаться между двумя этими представлениями с помощью кнопок в окне Свойства. You can switch between these two views by using the buttons on the Properties window. В этом руководстве свойства легче находить в представлении, в котором свойства представлены в алфавитном порядке. In this tutorial, it’s easier to find properties through the Alphabetical view.

Вернитесь к конструктору Windows Forms. Go back to Windows Forms Designer. Нажмите нижний правый маркер перетаскивания формы, который представляет собой небольшой белый квадрат в нижнем правом углу формы и показан на рисунке ниже. Choose the form’s lower-right drag handle, which is the small white square in the lower-right of the form and appears as follows.


Маркер перетаскивания Drag handle

Перетащите маркер, чтобы изменить размер формы — она должна стать шире и немного выше. Drag the handle to resize the form so the form is wider and a bit taller.

Посмотрите в окно Свойства и обратите внимание, что изменилось значение свойства Size. Look at the Properties window, and notice that the Size property has changed. Свойство Size меняется при каждом изменении формы. The Size property changes each time you resize the form. Перетащите маркер, чтобы форма имела размер около 550, 350 (не обязательно точно такие значения). Такой размер вполне подходит для этого проекта. Try dragging the form’s handle to resize it to a form size of approximately 550, 350 (no need to be exact), which should work well for this project. В качестве альтернативы можно вводить значения непосредственно в свойстве Size и затем нажимать клавишу ВВОД. As an alternative, you can enter the values directly in the Size property and then choose the Enter key.

Запустите приложение еще раз. Run your app again. Помните, что для запуска приложения можно использовать любой из описанных ниже методов. Remember, you can use any of the following methods to run your app.

Нажмите клавишу F5. Choose the F5 key.

В строке меню выберите Отладка > Начать отладку. On the menu bar, choose Debug > Start Debugging.

На панели инструментов нажмите кнопку Начать отладку, которая показана на рисунке ниже. On the toolbar, choose the Start Debugging button, which appears as follows.

**Кнопка «Начать отладку»* _ _на панели инструментов* **Start Debugging* _ _toolbar button*

Как и ранее, интегрированная среда разработки выполняет сборку приложения и запускает его, после чего открывается окно. Just like before, the IDE builds and runs your app, and a window appears.

Перед переходом к следующему шагу остановите приложение, так как интегрированная среда разработки не позволяет изменять выполняющееся приложение. Before going to the next step, stop your app, because the IDE won’t let you change your app while it’s running. Помните, что для остановки приложения можно использовать любой из описанных ниже методов. Remember, you can use any of the following methods to stop your app.

На панели инструментов нажмите кнопку Остановить отладку. On the toolbar, choose the Stop Debugging button.

В строке меню выберите Отладка > Остановить отладку. On the menu bar, choose Debug > Stop Debugging.

На клавиатуре нажмите клавиши SHIFT+F5. Use your keyboard and press Shift+F5.

Нажмите кнопку X в верхнем углу окна Программа просмотра изображений. Choose the X button in the upper corner of the Picture Viewer window.

Дальнейшие действия Next steps

Предыдущий раздел руководства: Шаг 2. Запуск приложения для просмотра изображений. To return to the previous tutorial step, see Step 2: Run your picture viewer app.

Атрибуты в элементах управления Windows Forms Attributes in Windows Forms Controls

.NET Framework предоставляет широкий набор атрибутов, которые можно применять к членам пользовательских элементов управления и компонентов. The .NET Framework provides a variety of attributes you can apply to the members of your custom controls and components. Некоторые из этих атрибутов влияют на поведение класса во время выполнения, а другие – на поведение во время разработки. Some of these attributes affect the run-time behavior of a class, and others affect the design-time behavior.

Атрибуты для свойств элементов управления и компонентов Attributes for Control and Component Properties

В следующей таблице представлены атрибуты, которые можно применять к свойствам или другим членам пользовательских элементов управления и компонентов. The following table shows the attributes you can apply to properties or other members of your custom controls and components. Пример использования этих атрибутов см. в разделе Практическое руководство. Применение атрибутов в элементах управления Windows Forms. For an example that uses many of these attributes, see How to: Apply Attributes in Windows Forms Controls.

attribute Attribute Описание Description
AmbientValueAttribute Указывает значение, которое нужно передать в свойство, чтобы свойство получило свое значение из другого источника. Specifies the value to pass to a property to cause the property to get its value from another source. Это называется окружением. This is known as ambience.
BrowsableAttribute Указывает, должно ли свойство или событие отображаться в окне свойств . Specifies whether a property or event should be displayed in a Properties window.
CategoryAttribute Указывает имя категории, в которой будет группироваться свойство или событие при отображении в PropertyGrid элементе управления, установленном в Categorized режим. Specifies the name of the category in which to group the property or event when displayed in a PropertyGrid control set to Categorized mode.
DefaultValueAttribute Указывает значение свойства по умолчанию. Specifies the default value for a property.
DescriptionAttribute Задает описание для свойства или события. Specifies a description for a property or event.
DisplayNameAttribute Указывает отображаемое имя для свойства, события или метода public void , у которого нет аргументов. Specifies the display name for a property, event, or public void method that takes no arguments.
EditorAttribute Указывает редактор, используемый для изменения свойства. Specifies the editor to use to change a property.
EditorBrowsableAttribute Указывает, что свойство или метод можно просматривать в редакторе. Specifies that a property or method is viewable in an editor.
HelpKeywordAttribute Указывает ключевое слово контекста для класса или элемента. Specifies the context keyword for a class or member.
LocalizableAttribute Указывает, должно ли быть локализовано свойство. Specifies whether a property should be localized.
PasswordPropertyTextAttribute Указывает, что текстовое представление объекта скрыто символами, например звездочками. Indicates that an object’s text representation is obscured by characters such as asterisks.
ReadOnlyAttribute Указывает, предназначено ли свойство, к которому привязан этот атрибут, только для чтения или для чтения и записи во время разработки. Specifies whether the property this attribute is bound to is read-only or read/write at design time.
RefreshPropertiesAttribute Указывает, что таблица свойств должна обновляться при изменении значения связанного свойства. Indicates that the property grid should refresh when the associated property value changes.
TypeConverterAttribute Указывает, какой тип использовать в качестве преобразователя для объекта, с которым связан этот атрибут. Specifies what type to use as a converter for the object this attribute is bound to.

Атрибуты для свойств привязки данных Attributes for Data Binding Properties

В следующей таблице представлены атрибуты, с помощью которых можно указывать, как пользовательские элементы управления и компоненты взаимодействуют с привязкой данных. The following table shows the attributes you can apply to specify how your custom controls and components interact with data binding.

attribute Attribute Описание Description
BindableAttribute Указывает, используется ли обычно свойство для привязки. Specifies whether a property is typically used for binding.
ComplexBindingPropertiesAttribute Указывает источник данных и свойства элемента данных для компонента. Specifies the data source and data member properties for a component.
DefaultBindingPropertyAttribute Задает свойство привязки по умолчанию для компонента. Specifies the default binding property for a component.
LookupBindingPropertiesAttribute Указывает источник данных и свойства элемента данных для компонента. Specifies the data source and data member properties for a component.
AttributeProviderAttribute Включает перенаправление атрибутов. Enables attribute redirection.

Атрибуты для классов Attributes for Classes

В следующей таблице представлены атрибуты, с помощью которых можно указать поведение пользовательских элементов управления и компонентов во время разработки. The following table shows the attributes you can apply to specify the behavior of your custom controls and components at design time.

Form Class

Definition

Represents a window or dialog box that makes up an application’s user interface.

Examples

The following example creates a new instance of a Form and calls the ShowDialog method to display the form as a dialog box. The example sets the FormBorderStyle, AcceptButton, CancelButton, MinimizeBox, MaximizeBox, and StartPosition properties to change the appearance and functionality of the form to a dialog box. The example also uses the Add method of the form’s Controls collection to add two Button controls. The example uses the HelpButton property to display a help button in the caption bar of the dialog box.

Remarks

A Form is a representation of any window displayed in your application. The Form class can be used to create standard, tool, borderless, and floating windows. You can also use the Form class to create modal windows such as a dialog box. A special kind of form, the multiple-document interface (MDI) form, can contain other forms called MDI child forms. An MDI form is created by setting the IsMdiContainer property to true . MDI child forms are created by setting the MdiParent property to the MDI parent form that will contain the child form.

Using the properties available in the Form class, you can determine the appearance, size, color, and window management features of the window or dialog box you are creating. The Text property allows you to specify the caption of the window in the title bar. The Size and DesktopLocation properties allow you to define the size and position of the window when it is displayed. You can use the ForeColor color property to change the default foreground color of all controls placed on the form. The FormBorderStyle, MinimizeBox, and MaximizeBox properties allow you to control whether the form can be minimized, maximized, or resized at run time.

In addition to properties, you can use the methods of the class to manipulate a form. For example, you can use the ShowDialog method to show a form as a modal dialog box. You can use the SetDesktopLocation method to position the form on the desktop.

The events of the Form class allow you to respond to actions performed on the form. You can use the Activated event to perform operations such as updating the data displayed in the controls of the form when the form is activated.

You can use a form as the starting class in your application by placing a method called Main in the class. In the Main method add code to create and show the form. You will also need to add the STAThread attribute to the Main method in order for the form to run. When the starting form is closed, the application is also closed.

If you set the Enabled property to false before the Form is visible (for example, setting Enabled to false in the Microsoft Visual Studio designer), the minimize, maximize, close, and system buttons remain enabled. If you set Enabled to false after the Form is visible (for example, when the Load event occurs), the buttons are disabled.

Constructors

Initializes a new instance of the Form class.

Fields

Determines the value of the AutoScroll property.

(Inherited from ScrollableControl) ScrollStateFullDrag

Determines whether the user has enabled full window drag.

(Inherited from ScrollableControl) ScrollStateHScrollVisible

Determines whether the value of the HScroll property is set to true .

(Inherited from ScrollableControl) ScrollStateUserHasScrolled

Determines whether the user had scrolled through the ScrollableControl control.

(Inherited from ScrollableControl) ScrollStateVScrollVisible

Determines whether the value of the VScroll property is set to true .

(Inherited from ScrollableControl)

Properties

Gets or sets the button on the form that is clicked when the user presses the ENTER key.

Gets the AccessibleObject assigned to the control.

(Inherited from Control) AccessibleDefaultActionDescription

Gets or sets the default action description of the control for use by accessibility client applications.

(Inherited from Control) AccessibleDescription

Gets or sets the description of the control used by accessibility client applications.

(Inherited from Control) AccessibleName

Gets or sets the name of the control used by accessibility client applications.

(Inherited from Control) AccessibleRole

Gets or sets the accessible role of the control.

(Inherited from Control) ActiveControl

Gets or sets the active control on the container control.

(Inherited from ContainerControl) ActiveForm

Gets the currently active form for this application.

Gets the currently active multiple-document interface (MDI) child window.

Gets or sets a value indicating whether the control can accept data that the user drags onto it.

(Inherited from Control) AllowTransparency

Gets or sets a value indicating whether the opacity of the form can be adjusted.

Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent.

(Inherited from Control) AutoScale

Gets or sets a value indicating whether the form adjusts its size to fit the height of the font used on the form and scales its controls.

Gets or sets the base size used for autoscaling of the form.

Gets or sets the dimensions that the control was designed to.

(Inherited from ContainerControl) AutoScaleFactor

Gets the scaling factor between the current and design-time automatic scaling dimensions.

(Inherited from ContainerControl) AutoScaleMode

Gets or sets the automatic scaling mode of the control.

(Inherited from ContainerControl) AutoScroll

Gets or sets a value indicating whether the form enables autoscrolling.

Gets or sets the size of the auto-scroll margin.

(Inherited from ScrollableControl) AutoScrollMinSize

Gets or sets the minimum size of the auto-scroll.

(Inherited from ScrollableControl) AutoScrollOffset

Gets or sets where this control is scrolled to in ScrollControlIntoView(Control).

(Inherited from Control) AutoScrollPosition

Gets or sets the location of the auto-scroll position.

(Inherited from ScrollableControl) AutoSize

Resize the form according to the setting of AutoSizeMode.

This property is not relevant for this class.

(Inherited from Control) AutoSizeMode

Gets or sets the mode by which the form automatically resizes itself.

Gets or sets a value that indicates whether controls in this container will be automatically validated when the focus changes.

Gets or sets a value that indicates whether controls in this container will be automatically validated when the focus changes.

(Inherited from ContainerControl) BackColor

Gets or sets the background color for the control.

Gets or sets the background image displayed in the control.

(Inherited from Control) BackgroundImageLayout

Gets or sets the background image layout as defined in the ImageLayout enumeration.

(Inherited from Control) BindingContext

Gets or sets the BindingContext for the control.

(Inherited from ContainerControl) Bottom

Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container’s client area.

(Inherited from Control) Bounds

Gets or sets the size and location of the control including its nonclient elements, in pixels, relative to the parent control.

(Inherited from Control) CancelButton

Gets or sets the button control that is clicked when the user presses the ESC key.

Gets a value indicating whether the ImeMode property can be set to an active value, to enable IME support.

(Inherited from ContainerControl) CanFocus

Gets a value indicating whether the control can receive focus.

(Inherited from Control) CanRaiseEvents

Determines if events can be raised on the control.

(Inherited from Control) CanSelect

Gets a value indicating whether the control can be selected.

(Inherited from Control) Capture

Gets or sets a value indicating whether the control has captured the mouse.

(Inherited from Control) CausesValidation

Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.

(Inherited from Control) ClientRectangle

Gets the rectangle that represents the client area of the control.

(Inherited from Control) ClientSize

Gets or sets the size of the client area of the form.

Gets the name of the company or creator of the application containing the control.

(Inherited from Control) Container

Gets the IContainer that contains the Component.

(Inherited from Component) ContainsFocus

Gets a value indicating whether the control, or one of its child controls, currently has the input focus.

(Inherited from Control) ContextMenu

Gets or sets the shortcut menu associated with the control.

(Inherited from Control) ContextMenuStrip

Gets or sets the ContextMenuStrip associated with this control.

(Inherited from Control) ControlBox

Gets or sets a value indicating whether a control box is displayed in the caption bar of the form.

Gets the collection of controls contained within the control.

(Inherited from Control) Created

Gets a value indicating whether the control has been created.

(Inherited from Control) CreateParams

Gets the required creation parameters when the control handle is created.

Gets the current run-time dimensions of the screen.

(Inherited from ContainerControl) Cursor

Gets or sets the cursor that is displayed when the mouse pointer is over the control.

(Inherited from Control) DataBindings

Gets the data bindings for the control.

(Inherited from Control) DefaultCursor

Gets or sets the default cursor for the control.

(Inherited from Control) DefaultImeMode

Gets the default Input Method Editor (IME) mode supported by the control.

Gets the space, in pixels, that is specified by default between controls.

(Inherited from Control) DefaultMaximumSize

Gets the length and height, in pixels, that is specified as the default maximum size of a control.

(Inherited from Control) DefaultMinimumSize

Gets the length and height, in pixels, that is specified as the default minimum size of a control.

(Inherited from Control) DefaultPadding

Gets the internal spacing, in pixels, of the contents of a control.

(Inherited from Control) DefaultSize

Gets the default size of the control.

Gets a value that indicates whether the Component is currently in design mode.

(Inherited from Component) DesktopBounds

Gets or sets the size and location of the form on the Windows desktop.

Gets or sets the location of the form on the Windows desktop.

Gets the DPI value for the display device where the control is currently being displayed.

(Inherited from Control) DialogResult

Gets or sets the dialog result for the form.

Gets the rectangle that represents the virtual display area of the control.

(Inherited from ScrollableControl) Disposing

Gets a value indicating whether the base Control class is in the process of disposing.

(Inherited from Control) Dock

Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent.

(Inherited from Control) DockPadding

Gets the dock padding settings for all edges of the control.

(Inherited from ScrollableControl) DoubleBuffered

Gets or sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker.

(Inherited from Control) Enabled

Gets or sets a value indicating whether the control can respond to user interaction.

(Inherited from Control) Events

Gets the list of event handlers that are attached to this Component.

(Inherited from Component) Focused

Gets a value indicating whether the control has input focus.

(Inherited from Control) Font

Gets or sets the font of the text displayed by the control.

(Inherited from Control) FontHeight

Gets or sets the height of the font of the control.

(Inherited from Control) ForeColor

Gets or sets the foreground color of the control.

(Inherited from Control) FormBorderStyle

Gets or sets the border style of the form.

Gets the window handle that the control is bound to.

(Inherited from Control) HasChildren

Gets a value indicating whether the control contains one or more child controls.

(Inherited from Control) Height

Gets or sets the height of the control.

(Inherited from Control) HelpButton

Gets or sets a value indicating whether a Help button should be displayed in the caption box of the form.

Gets the characteristics associated with the horizontal scroll bar.

(Inherited from ScrollableControl) HScroll

Gets or sets a value indicating whether the horizontal scroll bar is visible.

(Inherited from ScrollableControl) Icon

Gets or sets the icon for the form.

Gets or sets the Input Method Editor (IME) mode of the control.

(Inherited from Control) ImeModeBase

Gets or sets the IME mode of a control.

(Inherited from Control) InvokeRequired

Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on.

(Inherited from Control) IsAccessible

Gets or sets a value indicating whether the control is visible to accessibility applications.

(Inherited from Control) IsDisposed

Gets a value indicating whether the control has been disposed of.

(Inherited from Control) IsHandleCreated

Gets a value indicating whether the control has a handle associated with it.

(Inherited from Control) IsMdiChild

Gets a value indicating whether the form is a multiple-document interface (MDI) child form.

Gets or sets a value indicating whether the form is a container for multiple-document interface (MDI) child forms.

Gets a value indicating whether the control is mirrored.

(Inherited from Control) IsRestrictedWindow

Gets a value indicating whether the form can use all windows and user input events without restriction.

Gets or sets a value indicating whether the form will receive key events before the event is passed to the control that has focus.

Gets a cached instance of the control’s layout engine.

(Inherited from Control) Left

Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container’s client area.

(Inherited from Control) Location

Gets or sets the Point that represents the upper-left corner of the Form in screen coordinates.

Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.

(Inherited from Control) MainMenuStrip

Gets or sets the primary menu container for the form.

Gets or sets the space between controls.

Gets or sets the space between controls.

(Inherited from Control) MaximizeBox

Gets or sets a value indicating whether the Maximize button is displayed in the caption bar of the form.

Gets or sets the size of the form when it is maximized.

Gets the maximum size the form can be resized to.

Gets an array of forms that represent the multiple-document interface (MDI) child forms that are parented to this form.

Gets or sets the current multiple-document interface (MDI) parent form of this form.

Gets or sets the MainMenu that is displayed in the form.

Gets the merged menu for the form.

Gets or sets a value indicating whether the Minimize button is displayed in the caption bar of the form.

Gets or sets the minimum size the form can be resized to.

Gets a value indicating whether this form is displayed modally.

Gets or sets the name of the control.

(Inherited from Control) Opacity

Gets or sets the opacity level of the form.

Gets an array of Form objects that represent all forms that are owned by this form.

Gets or sets the form that owns this form.

Gets or sets padding within the control.

(Inherited from Control) Parent

Gets or sets the parent container of the control.

(Inherited from Control) ParentForm

Gets the form that the container control is assigned to.

(Inherited from ContainerControl) PreferredSize

Gets the size of a rectangular area into which the control can fit.

(Inherited from Control) ProductName

Gets the product name of the assembly containing the control.

(Inherited from Control) ProductVersion

Gets the version of the assembly containing the control.

(Inherited from Control) RecreatingHandle

Gets a value indicating whether the control is currently re-creating its handle.

(Inherited from Control) Region

Gets or sets the window region associated with the control.

(Inherited from Control) RenderRightToLeft

This property is now obsolete.

(Inherited from Control) ResizeRedraw

Gets or sets a value indicating whether the control redraws itself when resized.

(Inherited from Control) RestoreBounds

Gets the location and size of the form in its normal window state.

Gets the distance, in pixels, between the right edge of the control and the left edge of its container’s client area.

(Inherited from Control) RightToLeft

Gets or sets a value indicating whether control’s elements are aligned to support locales using right-to-left fonts.

(Inherited from Control) RightToLeftLayout

Gets or sets a value indicating whether right-to-left mirror placement is turned on.

Gets a value that determines the scaling of child controls.

(Inherited from Control) ShowFocusCues

Gets a value indicating whether the control should display focus rectangles.

(Inherited from Control) ShowIcon

Gets or sets a value indicating whether an icon is displayed in the caption bar of the form.

Gets or sets a value indicating whether the form is displayed in the Windows taskbar.

Gets a value indicating whether the user interface is in the appropriate state to show or hide keyboard accelerators.

(Inherited from Control) ShowWithoutActivation

Gets a value indicating whether the window will be activated when it is shown.

Gets or sets the site of the control.

(Inherited from Control) Size

Gets or sets the size of the form.

Gets or sets the style of the size grip to display in the lower-right corner of the form.

Gets or sets the starting position of the form at run time.

Gets or sets the tab order of the control within its container.

Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.

Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.

(Inherited from Control) Tag

Gets or sets the object that contains data about the control.

(Inherited from Control) Text

Gets or sets the text associated with this control.

Gets or sets the text associated with this control.

(Inherited from Control) Top

Gets or sets the distance, in pixels, between the top edge of the control and the top edge of its container’s client area.

(Inherited from Control) TopLevel

Gets or sets a value indicating whether to display the form as a top-level window.

Gets the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in.

(Inherited from Control) TopMost

Gets or sets a value indicating whether the form should be displayed as a topmost form.

Gets or sets the color that will represent transparent areas of the form.

Gets or sets a value indicating whether to use the wait cursor for the current control and all child controls.

(Inherited from Control) VerticalScroll

Gets the characteristics associated with the vertical scroll bar.

(Inherited from ScrollableControl) Visible

Gets or sets a value indicating whether the control and all its child controls are displayed.

(Inherited from Control) VScroll

Gets or sets a value indicating whether the vertical scroll bar is visible.

(Inherited from ScrollableControl) Width

Gets or sets the width of the control.

(Inherited from Control) WindowState

Gets or sets a value that indicates whether form is minimized, maximized, or normal.

This property is not relevant for this class.

(Inherited from Control)

Methods

Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control.

(Inherited from Control) AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)

Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control .

(Inherited from Control) Activate()

Activates the form and gives it focus.

Activates the MDI child of a form.

Adds an owned form to this form.

Adjusts the scroll bars on the container based on the current control positions and the control currently selected.

Resizes the form according to the current value of the AutoScaleBaseSize property and the size of the current font.

Executes the specified delegate asynchronously on the thread that the control’s underlying handle was created on.

(Inherited from Control) BeginInvoke(Delegate, Object[])

Executes the specified delegate asynchronously with the specified arguments, on the thread that the control’s underlying handle was created on.

(Inherited from Control) BringToFront()

Brings the control to the front of the z-order.

(Inherited from Control) CenterToParent()

Centers the position of the form within the bounds of the parent form.

Centers the form on the current screen.

Closes the form.

Retrieves a value indicating whether the specified control is a child of the control.

(Inherited from Control) CreateAccessibilityInstance()

Creates a new accessibility object for the Form control.

Creates a new accessibility object for the control.

(Inherited from Control) CreateControl()

Forces the creation of the visible control, including the creation of the handle and any visible child controls.

(Inherited from Control) CreateControlsInstance()

Creates a new instance of the control collection for the control.

Creates the Graphics for the control.

(Inherited from Control) CreateHandle()

Creates the handle for the form. If a derived class overrides this function, it must call the base implementation.

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject) DefWndProc(Message)

Sends the specified message to the default window procedure.

Destroys the handle associated with the control.

(Inherited from Control) Dispose()

Releases all resources used by the Component.

(Inherited from Component) Dispose(Boolean)

Disposes of the resources (other than memory) used by the Form.

Begins a drag-and-drop operation.

(Inherited from Control) DrawToBitmap(Bitmap, Rectangle)

Supports rendering to the specified bitmap.

(Inherited from Control) EndInvoke(IAsyncResult)

Retrieves the return value of the asynchronous operation represented by the IAsyncResult passed.

(Inherited from Control) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object) FindForm()

Retrieves the form that the control is on.

(Inherited from Control) Focus()

Sets input focus to the control.

(Inherited from Control) GetAccessibilityObjectById(Int32)

Retrieves the specified AccessibleObject.

(Inherited from Control) GetAutoScaleSize(Font)

Gets the size when autoscaling the form based on a specified font.

Retrieves a value indicating how a control will behave when its AutoSize property is enabled.

(Inherited from Control) GetChildAtPoint(Point)

Retrieves the child control that is located at the specified coordinates.

(Inherited from Control) GetChildAtPoint(Point, GetChildAtPointSkip)

Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type.

(Inherited from Control) GetContainerControl()

Returns the next ContainerControl up the control’s chain of parent controls.

(Inherited from Control) GetHashCode()

Serves as the default hash function.

(Inherited from Object) GetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject) GetNextControl(Control, Boolean)

Retrieves the next control forward or back in the tab order of child controls.

(Inherited from Control) GetPreferredSize(Size)

Retrieves the size of a rectangular area into which a control can be fitted.

(Inherited from Control) GetScaledBounds(Rectangle, SizeF, BoundsSpecified)

Retrieves the bounds within which the control is scaled.

Retrieves the bounds within which the control is scaled.

(Inherited from Control) GetScrollState(Int32)

Determines whether the specified flag has been set.

(Inherited from ScrollableControl) GetService(Type)

Returns an object that represents a service provided by the Component or by its Container.

(Inherited from Component) GetStyle(ControlStyles)

Retrieves the value of the specified control style bit for the control.

(Inherited from Control) GetTopLevel()

Determines if the control is a top-level control.

(Inherited from Control) GetType()

Gets the Type of the current instance.

(Inherited from Object) Hide()

Conceals the control from the user.

(Inherited from Control) InitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject) InitLayout()

Called after the control has been added to another container.

(Inherited from Control) Invalidate()

Invalidates the entire surface of the control and causes the control to be redrawn.

(Inherited from Control) Invalidate(Boolean)

Invalidates a specific region of the control and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.

(Inherited from Control) Invalidate(Rectangle)

Invalidates the specified region of the control (adds it to the control’s update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.

(Inherited from Control) Invalidate(Rectangle, Boolean)

Invalidates the specified region of the control (adds it to the control’s update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.

(Inherited from Control) Invalidate(Region)

Invalidates the specified region of the control (adds it to the control’s update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.

(Inherited from Control) Invalidate(Region, Boolean)

Invalidates the specified region of the control (adds it to the control’s update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.

(Inherited from Control) Invoke(Delegate)

Executes the specified delegate on the thread that owns the control’s underlying window handle.

(Inherited from Control) Invoke(Delegate, Object[])

Executes the specified delegate, on the thread that owns the control’s underlying window handle, with the specified list of arguments.

(Inherited from Control) InvokeGotFocus(Control, EventArgs)

Raises the GotFocus event for the specified control.

(Inherited from Control) InvokeLostFocus(Control, EventArgs)

Raises the LostFocus event for the specified control.

(Inherited from Control) InvokeOnClick(Control, EventArgs)

Raises the Click event for the specified control.

(Inherited from Control) InvokePaint(Control, PaintEventArgs)

Raises the Paint event for the specified control.

(Inherited from Control) InvokePaintBackground(Control, PaintEventArgs)

Raises the PaintBackground event for the specified control.

(Inherited from Control) IsInputChar(Char)

Determines if a character is an input character that the control recognizes.

(Inherited from Control) IsInputKey(Keys)

Determines whether the specified key is a regular input key or a special key that requires preprocessing.

(Inherited from Control) LayoutMdi(MdiLayout)

Arranges the multiple-document interface (MDI) child forms within the MDI parent form.

Converts a Logical DPI value to its equivalent DeviceUnit DPI value.

(Inherited from Control) LogicalToDeviceUnits(Size)

Transforms a size from logical to device units by scaling it for the current DPI and rounding down to the nearest integer value for width and height.

(Inherited from Control) MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object) MemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject) NotifyInvalidate(Rectangle)

Raises the Invalidated event with a specified region of the control to invalidate.

Читайте также:  Linux check open ports on remote ip
Оцените статью