System windows forms form methods

Как создать Windows Forms приложение из командной строки How to: Create a Windows Forms application from the command line

В процедурах ниже описаны основные шаги, которые необходимо выполнить для создания и запуска приложения Windows Forms из командной строки. The following procedures describe the basic steps that you must complete to create and run a Windows Forms application from the command line. Visual Studio предлагает расширенную поддержку этих процедур. There is extensive support for these procedures in Visual Studio. См. также раздел Пошаговое руководство. размещение элемента управления Windows Forms в WPF. Also see Walkthrough: Hosting a Windows Forms Control in WPF.

Процедура Procedure

Создание формы To create the form

В пустом файле кода введите следующую Imports using инструкцию или: In an empty code file, type the following Imports or using statements:

Объявите класс с именем Form1 , наследуемый от класса Form: Declare a class named Form1 that inherits from the Form class:

Создайте конструктор без параметров для Form1 . Create a parameterless constructor for Form1 .

В следующий процедуре будет добавлен дополнительный код конструктора. You will add more code to the constructor in a subsequent procedure.

Добавьте в класс метод Main . Add a Main method to the class.

Примените STAThreadAttribute к Main методу C#, чтобы указать Windows Forms приложение является однопотоковым апартаментом. Apply the STAThreadAttribute to the C# Main method to specify your Windows Forms application is a single-threaded apartment. (Атрибут не является обязательным в Visual Basic, так как приложения Windows Forms, разработанные с помощью Visual Basic, по умолчанию используют модель апартамента с одним потоком.) (The attribute is not necessary in Visual Basic, since Windows forms applications developed with Visual Basic use a single-threaded apartment model by default.)

Вызовите EnableVisualStyles , чтобы применить стили операционной системы к приложению. Call EnableVisualStyles to apply operating system styles to your application.

Создайте экземпляр формы и запустите его. Create an instance of the form and run it.

Компиляция и запуск приложения To compile and run the application

В командной строке .NET Framework перейдите к папке, в которой содержится класс Form1 . At the .NET Framework command prompt, navigate to the directory you created the Form1 class.

Скомпилируйте форму. Compile the form.

Если используется C#, введите: csc form1.cs If you are using C#, type: csc form1.cs

При использовании Visual Basic введите: vbc form1.vb If you are using Visual Basic, type: vbc form1.vb

В командной строке введите следующий текст: Form1.exe . At the command prompt, type: Form1.exe

Добавление элемента управления и обработка события Adding a control and handling an event

В предыдущей процедуре продемонстрировано, как создать простейшую форму Windows Forms, скомпилировать и запустить ее. The previous procedure steps demonstrated how to just create a basic Windows Form that compiles and runs. В следующей процедуре будет показано, как создать и добавить в форму элемент управления и как обрабатывать событие для него. The next procedure will show you how to create and add a control to the form, and handle an event for the control. Дополнительные сведения об элементах управления, которые можно добавить в Windows Forms, см. в разделе элементы управления Windows Forms. For more information about the controls you can add to Windows Forms, see Windows Forms Controls.

Помимо понимания способов создания приложений Windows Forms, следует обладать общими знаниями о программировании на основе событий и способах обработки данных, введенных пользователем. In addition to understanding how to create Windows Forms applications, you should understand event-based programming and how to handle user input. Дополнительные сведения см. в статьях Создание обработчиков событий в Windows Formsи обработка входных данных пользователя . For more information, see Creating Event Handlers in Windows Forms, and Handling User Input

Объявление элемента управления типа «Кнопка» и обработка событий щелчка мышью для нее To declare a button control and handle its click event

Объявите элемент управления типа «Кнопка» с именем button1 . Declare a button control named button1 .

В конструкторе создайте кнопку и задайте ее свойства Size, Location и Text. In the constructor, create the button and set its Size, Location and Text properties.

Добавьте кнопку в форму. Add the button to the form.

В следующем примере кода показано, как объявить элемент управления Button: The following code example demonstrates how to declare the button control:

Создайте метод для обработки события Click для кнопки. Create a method to handle the Click event for the button.

В обработчике событий щелчка мышью выведите элемент управления MessageBox с сообщением «Здравствуй, мир». In the click event handler, display a MessageBox with the message, «Hello World».

В следующем примере кода показано, как обрабатывается событие Click элемента управления Button: The following code example demonstrates how to handle the button control’s click event:

Свяжите событие Click с созданным методом. Associate the Click event with the method you created.

В примере кода ниже показано, как связать событие с методом. The following code example demonstrates how to associate the event with the method.

Скомпилируйте и запустите приложение, как описано в предыдущей процедуре. Compile and run the application as described in the previous procedure.

Пример Example

В следующем примере кода приведен полный пример из предыдущих процедур. The following code example is the complete example from the previous procedures:

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.

Читайте также:  Epson l132 linux driver

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.

Читайте также:  Ноутбук не видит джойстик что делать windows

(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.

Читайте также:  Linux создать загрузочный диск windows

(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.

Оцените статью