Вы находитесь на странице: 1из 35

(Graphical User Interface, GUI)

,

(, , . .).
Form , . Form
, borderless .
Form , .
MDI (MDI)
MDI. MDI IsMdiContainer true.
MDI MdiParent MDI
, .
, Form , , ,
. Text
. Size DesktopLocation
, . ForeColor
, ,
.FormBorderStyle " MinimizeBox MaximizeBox
, .
,
., ShowDialog ,
. SetDesktopLocation
.
Form

.
Activated , ,
, .

Main . Main . ,
STAThread Main .
.

Enabled false Form


(,
Enabled false Microsoft Visual Studio ),
,

.
Enabled false Form (, load ),
.

C#
C++
F#
VB
'
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
<ComVisibleAttribute(True)> _
Public Class Form _
Inherits ContainerControl
Form .

Form .

Form

AcceptButton


,
.

AccessibilityObject

AccessibleObject,
. ( Control.)

AccessibleDefaultActionDescription




. ( Control.)

AccessibleDescription

,

. (
Control.)

AccessibleName

,

. (
Control.)

AccessibleRole


.(
Control.)

ActiveControl


.(
ContainerControl.)

ActiveForm

ActiveMdiChild


mdi- (MDI).

AllowDrop

, ,
,
. (
Control.)

AllowTransparency

. ,

,
.
Anchor

,
,


.( Control.)

AutoScale

. ,
,
,

.

AutoScaleBaseSize

,
autoscaling .

AutoScaleDimensions

,
. (
ContainerControl.)

AutoScaleFactor



. (
ContainerControl.)

AutoScaleMode


. (
ContainerControl.)

AutoScroll

, ,

autoscrolling. (ScrollableControl.AutoScr
oll.)

AutoScrollMargin


. ( ScrollableControl.)

AutoScrollMinSize


. (
ScrollableControl.)

AutoScrollOffset

,

ScrollControlIntoView. ( Control.)

AutoScrollPosition


. (
ScrollableControl.)

AutoSize

AutoSizeMode. ( Control.A
utoSize.)
AutoSizeMode

,
.

AutoValidate

, ,


. ( ContainerControl.AutoValidate
.)

BackColor


. ( Control.BackColor.)

BackgroundImage

,
. (
Control.)

BackgroundImageLayout



ImageLayout.( Control.)

BindingContext

BindingContext
. (
ContainerControl.)

Bottom

( )

. (
Control.)

Bounds

(
) ,
,
. (
Control.)

CancelButton

" ",
,
ESC.

CanEnableIme

, ,
ImeMode
,
IME. ( ContainerControl.)

CanFocus

, ,
. ( Control.)

CanRaiseEvents

,
. ( Control.)

CanSelect

, ,
. (
Control.)

Capture

, ,

.( Control.)

CausesValidation

, ,

. ( Control.)

ClientRectangle

,

. ( Control.)

ClientSize

CompanyName


,
.( Control.)

Container

IContainer,
Component. ( Component.)

ContainsFocus

, ,

. ( Control.)

ContextMenu

,

. ( Control.)

ContextMenuStrip

ContextMenuStrip,

.( Control.)

ControlBox

, ,

.

Controls

,
. (
Control.)

Created

, ,
. ( Control.)

CreateParams



.( ContainerControl.CreatePar

ams.)
CurrentAutoScaleDimensions


. ( ContainerControl.)

Cursor

, ,

.( Control.)

DataBindings


. ( Control.)

DefaultCursor


. ( Control.)

DefaultImeMode


(IME),
. ( Control.DefaultImeMode.)

DefaultMargin

( ),

. ( Control.)

DefaultMaximumSize

( ),

. ( Control.)

DefaultMinimumSize

( ),

. ( Control.)

DefaultPadding


. (
Control.)

DefaultSize


. ( Control.DefaultSize.)

DesignMode

, ,
Component
. ( Component.)

DesktopBounds


windows.

DesktopLocation


windows.

DialogResult

DisplayRectangle

,

.( ScrollableControl.)

Disposing

, ,
Control
.( Control.)

Dock

,

,

. ( Control.)

DockPadding


. (
ScrollableControl.)

DoubleBuffered

, ,


,
.( Control.)

Enabled

, ,

. ( Control.)

Events

,

Component.( Component.)

Focused

, ,
. (
Control.)

Font

,
. ( Control.)

FontHeight


. ( Control.)

ForeColor


. ( Control.)

FormBorderStyle

Handle

,
. ( Control.)

HasChildren

, ,

. ( Control.)
Height


. ( Control.)

HelpButton

, ,

.

HorizontalScroll

,
. (
ScrollableControl.)

HScroll

, ,

.( ScrollableControl.)

Icon

ImeMode


. ( Control.)

ImeModeBase

IME
. ( Control.)

InvokeRequired

, ,
invoke
,
,

. ( Control.)

IsAccessible

, ,


. ( Control.)

IsDisposed

, ,
. ( Control.)

IsHandleCreated

, ,

. ( Control.)

IsMdiChild

, ,
MDI.

IsMdiContainer

, ,

MDI .

IsMirrored

, ,

. (
Control.)
IsRestrictedWindow

. ,
,

.

KeyPreview

, ,

, .

LayoutEngine


. (
Control.)

Left

( )

. (
Control.)

Location

Point,
Form .

MainMenuStrip

Margin

MaximizeBox

, ,

.

MaximizedBounds

,
.

MaximumSize

. (Control.MaximumSize.)

MdiChildren

,
MDI, parented
.

MdiParent

MDI (MDI)
.

Menu

MainMenu,
.

MergedMenu

MinimizeBox

, ,
.

MinimumSize



. (Control.MinimumSize.)

Modal

, ,
.

Name


. ( Control.)

Opacity

OwnedForms

Form,
,
.

Owner

,
.

Padding


. ( Control.)

Parent


. ( Control.)

ParentForm

,
, . (
ContainerControl.)

PreferredSize

,
.(
Control.)

ProductName

,
. ( Control.)

ProductVersion

,
. ( Control.)

RecreatingHandle

, ,

. ( Control.)

Region

,
. ( Control.)

RenderRightToLeft

. . (

Control.)
ResizeRedraw

, ,

. ( Control.)

RestoreBounds

Right

( )

. (
Control.)

RightToLeft

, ,

,
. ( Control.)

RightToLeftLayout

, ,
.

ScaleChildren

,
. (
Control.)

ShowFocusCues

, ,

.( Control.)

ShowIcon

, ,
.

ShowInTaskbar

, ,
windows.

ShowKeyboardCues

, ,

,
. ( Control.)

ShowWithoutActivation

, ,
.

Site


. ( Control.)

Size

SizeGripStyle


,
.

StartPosition

TabIndex

TabStop

, ,

tab.

Tag

,
. ( Control.)

Text

,
. ( Control.Text.)

Top

( )


. ( Control.)

TopLevel

, ,

.

TopLevelControl

,

Windows Forms. ,
Form,
. ( Control.)

TopMost

, ,

.

TransparencyKey

,
.

UseWaitCursor

, ,


. ( Control.)

VerticalScroll

,
. (
ScrollableControl.)

Visible

, ,

. (
Control.)

VScroll

, ,

. (
ScrollableControl.)

Width


. ( Control.)

WindowState

, ,
.

WindowTarget

.
. ( Control.)

AccessibilityNotify
Clients(AccessibleE
vents, Int32)


AccessibleEvents
. ( Control.)

AccessibilityNotify
Clients(AccessibleE
vents, Int32, Int32)


AccessibleEvents
. ( Control.)

Activate

ActivateMdiChild

MDI .

AddOwnedForm

AdjustFormScrollba
rs



. (ContainerControl.AdjustFormScrollbars(Boo
lean).)

ApplyAutoScaling

. .
AutoScaleBaseSize
.

BeginInvoke(Deleg
ate)

,
. (
Control.)

BeginInvoke(Deleg
ate, Object())


,
. ( Control.)

BringToFront

z-. (
Control.)

CenterToParent

.
.

CenterToScreen

. .

Close

Contains

, ,
. ( Control.)

CreateAccessibilityI
nstance


.( Control.)

CreateControl

,

. ( Control.)

CreateControlsInsta
nce



.( Control.CreateControlsInstance.)

CreateGraphics

Graphics . (
Control.)

CreateHandle

.
,
. ( Control.CreateHandle.)

CreateObjRef

,
-,
. ( MarshalByRefObject.)

DefWndProc

,
.( Control.DefWndProc(Message).)

DestroyHandle

,
. ( Control.)

Dispose

,
Component. ( Component.)

Dispose(Boolean)

( ),
Form. (ContainerControl.Dispose(Boolean)
.)

DoDragDrop

. ( Control.)

DrawToBitmap

. ( Control.)
EndInvoke

,
IAsyncResult. (
Control.)

Equals(Object)

,
. ( Object.)

Finalize


, Component
. ( Component.)

FindForm

,
. ( Control.)

Focus

. ( Control.)

GetAccessibilityObj
ectById

AccessibleObject. (
Control.)

GetAutoScaleSize

. autoscaling ,
.

GetAutoSizeMode

, ,
, AutoSize . (
Control.)

GetChildAtPoint(Po
int)

,
. ( Control.)

GetChildAtPoint(Po
int,
GetChildAtPointSki
p)

,
, ,
.( Control.)

GetContainerContro
l

ContainerControl
. (
Control.)

GetHashCode

- . (
Object.)

GetLifetimeService

,

. ( MarshalByRefObject.)

GetNextControl



. ( Control.)

GetPreferredSize

,
.( Control.)

GetScaledBounds

,
. (Control.GetScaledBounds(Rectangle, SizeF,
BoundsSpecified).)

GetScrollState

, . (
ScrollableControl.)

GetService

, ,
Component
Container. ( Component.)

GetStyle


. ( Control.)

GetTopLevel

,
. ( Control.)

GetType

Type . (
Object.)

Hide

. (
Control.)

InitializeLifetimeSe
rvice



. ( MarshalByRefObject.)

InitLayout


. ( Control.)

Invalidate


.( Control.)

Invalidate(Boolean)


.

. ( Control.)

Invalidate(Rectangl
e)


( ,
)
. (
Control.)

Invalidate(Region)


( ,
)
. (
Control.)

Invalidate(Rectangl
e, Boolean)


( ,
)
.

.( Control.)

Invalidate(Region,
Boolean)


( ,
)
.

.( Control.)

Invoke(Delegate)

,
. (
Control.)

Invoke(Delegate, O
bject())

,
,
. ( Control.)

InvokeGotFocus

GotFocus
. ( Control.)

InvokeLostFocus

LostFocus
. ( Control.)

InvokeOnClick

Click
. ( Control.)

InvokePaint

Paint
. ( Control.)

InvokePaintBackgro
und

PaintBackground
. ( Control.)

IsInputChar

, ,
. ( Control.)

IsInputKey

,
,
. ( Control.)

LayoutMdi

MDI
MDI .

MemberwiseClone

Object. (
Object.)

MemberwiseClone(
Boolean)


MarshalByRefObject. ( MarshalByRefObject.)

NotifyInvalidate

. Invalidated,

. ( Control.)

OnActivated

Activated

OnAutoSizeChange
d

AutoSizeChanged. ( Control.)

OnAutoValidateCha
nged

AutoValidateChanged . (
ContainerControl.)

OnBackColorChang
ed

BackColorChanged. ( Control.)

OnBackgroundImag
eChanged

BackgroundImageChanged (Control.OnBackgrou
ndImageChanged(EventArgs).)

OnBackgroundImag
eLayoutChanged

BackgroundImageLayoutChanged (Control.OnBa
ckgroundImageLayoutChanged(EventArgs).)

OnBindingContextC
hanged

BindingContextChanged. ( Control.)

OnCausesValidation
Changed

CausesValidationChanged. ( Control.)

OnChangeUICues

ChangeUICues. ( Control.)

OnClick

Click. ( Control.)

OnClientSizeChang
ed

ClientSizeChanged. ( Control.)

OnClosed

Closed

OnClosing

Closing

OnContextMenuCh
anged

ContextMenuChanged. ( Control.)

OnContextMenuStri
pChanged

ContextMenuStripChanged. ( Control.)

OnControlAdded

ControlAdded. ( Control.)

OnControlRemoved

ControlRemoved. ( Control.)

OnCreateControl

CreateControl ( ContainerControl.OnCreateCont
rol.)
OnCursorChanged

CursorChanged. ( Control.)

OnDeactivate

Deactivate

OnDockChanged

DockChanged. ( Control.)

OnDoubleClick

DoubleClick. ( Control.)

OnDragDrop

DragDrop. ( Control.)

OnDragEnter

DragEnter. ( Control.)

OnDragLeave

DragLeave. ( Control.)

OnDragOver

DragOver. ( Control.)

OnEnabledChanged

EnabledChanged. ( Control.OnEnabledChanged(
EventArgs).)

OnEnter

Enter ( Control.OnEnter(EventArgs).)

OnFontChanged

FontChanged . ( ContainerControl.OnF
ontChanged(EventArgs).)

OnForeColorChang
ed

ForeColorChanged. ( Control.)

OnFormClosed

FormClosed

OnFormClosing

FormClosing

OnGiveFeedback

GiveFeedback. ( Control.)

OnGotFocus

GotFocus. ( Control.)

OnHandleCreated

HandleCreated. ( Control.OnHandleCreated(Even
tArgs).)

OnHandleDestroyed

HandleDestroyed. ( Control.OnHandleDestroyed(
EventArgs).)

OnHelpButtonClick
ed

HelpButtonClicked

OnHelpRequested

HelpRequested. ( Control.)

OnImeModeChange
d

ImeModeChanged. ( Control.)

OnInputLanguageC
hanged

InputLanguageChanged

OnInputLanguageC
hanging

InputLanguageChanging

OnInvalidated

Invalidated. ( Control.)

OnKeyDown

KeyDown. ( Control.)

OnKeyPress

KeyPress. ( Control.)

OnKeyUp

KeyUp. ( Control.)

OnLayout

Layout ( ContainerControl.OnLayout(LayoutEven
tArgs).)

OnLeave

Leave. ( Control.)

OnLoad

Load

OnLocationChange
d

LocationChanged. ( Control.)

OnLostFocus

LostFocus. ( Control.)

OnMarginChanged

MarginChanged. ( Control.)

OnMaximizedBoun
dsChanged

MaximizedBoundsChanged

OnMaximumSizeCh
anged

MaximumSizeChanged

OnMdiChildActivat
e

MdiChildActivate

OnMenuComplete

MenuComplete

OnMenuStart

MenuStart

OnMinimumSizeCh
anged

MinimumSizeChanged

OnMouseCaptureCh
anged

MouseCaptureChanged. ( Control.)

OnMouseClick

MouseClick. ( Control.)

OnMouseDoubleCli
ck

MouseDoubleClick. ( Control.)

OnMouseDown

MouseDown. ( Control.)

OnMouseEnter

MouseEnter. ( Control.)

OnMouseHover

MouseHover. ( Control.)

OnMouseLeave

MouseLeave. ( Control.)

OnMouseMove

MouseMove. ( Control.)

OnMouseUp

MouseUp. ( Control.)

OnMouseWheel

MouseWheel . ( ScrollableControl.)

OnMove

Move. ( Control.)

OnNotifyMessage


Windows. ( Control.)

OnPaddingChanged

PaddingChanged . (
ScrollableControl.)

OnPaint

Paint. ( Control.OnPaint(PaintEventArgs).)

OnPaintBackground

. ( ScrollableControl.)

OnParentBackColor
Changed

BackColorChanged
BackColor . (
Control.)

OnParentBackgroun
dImageChanged

BackgroundImageChanged
BackgroundImage
. ( Control.)

OnParentBindingCo
ntextChanged

BindingContextChanged
BindingContext
. ( Control.)

OnParentChanged

ParentChanged. ( ContainerControl.)

OnParentCursorCha
nged

CursorChanged. ( Control.)

OnParentEnabledCh
anged

EnabledChanged
Enabled . (

Control.)
OnParentFontChang
ed

FontChanged
Font . (
Control.)

OnParentForeColor
Changed

ForeColorChanged
ForeColor . (
Control.)

OnParentRightToLe
ftChanged

RightToLeftChanged
RightToLeft . (
Control.)

OnParentVisibleCha
nged

VisibleChanged
Visible . (
Control.)

OnPreviewKeyDow
n

PreviewKeyDown. ( Control.)

OnPrint

Paint. ( Control.)

OnQueryContinueD
rag

QueryContinueDrag. ( Control.)

OnRegionChanged

RegionChanged. ( Control.)

OnResize

Resize. ( Control.OnResize(EventArgs).)

OnResizeBegin

ResizeBegin

OnResizeEnd

ResizeEnd

OnRightToLeftCha
nged

RightToLeftChanged. (
ScrollableControl.)

OnRightToLeftLayo
utChanged

RightToLeftLayoutChanged

OnScroll

Scroll . ( ScrollableControl.)

OnShown

Shown

OnSizeChanged

SizeChanged. ( Control.)

OnStyleChanged

StyleChanged. ( Control.OnStyleChanged(Event
Args).)

OnSystemColorsCh

SystemColorsChanged. ( Control.)

anged
OnTabIndexChange
d

TabIndexChanged. ( Control.)

OnTabStopChanged

TabStopChanged. ( Control.)

OnTextChanged

TextChanged. ( Control.OnTextChanged(EventAr
gs).)

OnValidated

Validated. ( Control.)

OnValidating

Validating. ( Control.)

OnVisibleChanged

VisibleChanged (ScrollableControl.OnVisibleCha
nged(EventArgs).)

PerformAutoScale


.( ContainerControl.)

PerformLayout


. (
Control.)

PerformLayout(Con
trol, String)


. (
Control.)

PointToClient


. ( Control.)

PointToScreen


. ( Control.)

PreProcessControl
Message



. ( Control.)

PreProcessMessage



. ( Control.)

ProcessCmdKey


. ( ContainerControl.ProcessCmdKey(Message,
Keys).)

ProcessDialogChar


. (ContainerControl.ProcessDialogChar(Char).)

ProcessDialogKey


. (ContainerControl.ProcessDialogKey(Keys).)

ProcessKeyEventAr
gs


. (
Control.)

ProcessKeyMessage

. ( Control.)

ProcessKeyPreview


. (Control.ProcessKeyPreview(Message).)

ProcessMnemonic

mnemonic
. ( ContainerControl.ProcessMnemonic(Char).)

ProcessTabKey



. ( ContainerControl.ProcessTabKey(Boolean).
)

RaiseDragEvent

.
. ( Control.)

RaiseKeyEvent

.
. ( Control.)

RaiseMouseEvent

.
. ( Control.)

RaisePaintEvent

.
. ( Control.)

RecreateHandle


. ( Control.)

RectangleToClient


. ( Control.)

RectangleToScreen

(
) . (
Control.)

Refresh

,

.(
Control.)

RemoveOwnedFor
m

ResetBackColor

BackColor

. ( Control.)
ResetBindings

,
BindingSource,
. (
Control.)

ResetCursor

Cursor . (
Control.)

ResetFont

Font . (
Control.)

ResetForeColor

ForeColor
. ( Control.)

ResetImeMode

ImeMode
. ( Control.)

ResetMouseEventA
rgs

.
MouseLeave.( Control.)

ResetRightToLeft

RightToLeft
. ( Control.)

ResetText

Text . (
Control.)

ResumeLayout

. ( Control.)

ResumeLayout(Boo
lean)

,

. ( Control.)

RtlTranslateAlignm
ent(ContentAlignme
nt)

ContentAlignment
ContentAlignment, ,
. ( Control.)

RtlTranslateAlignm
ent(HorizontalAlign
ment)

HorizontalAlignment
HorizontalAlignment, ,
.( Control.)

RtlTranslateAlignm
ent(LeftRightAlign
ment)

LeftRightAlignment
LeftRightAlignment, ,
.( Control.)

RtlTranslateContent

ContentAlignment
ContentAlignment, ,
. ( Control.)

RtlTranslateHorizon

HorizontalAlignment

tal

HorizontalAlignment, ,
.( Control.)

RtlTranslateLeftRig
ht

LeftRightAlignment
LeftRightAlignment, ,
.( Control.)

Scale(Single)

.
.( Control.)

Scale(SizeF)



. ( Control.)

Scale(Single,
Single)

.
.( Control.)

ScaleControl

, ,
.( ScrollableControl.ScaleControl(SizeF,
BoundsSpecified).)

ScaleCore


. ( ScrollableControl.ScaleCore(Single, Single).)

ScrollControlIntoVi
ew


, . ( ScrollableControl.)

ScrollToControl


. ( ScrollableControl.)

Select

. ( Control.)

Select(Boolean,
Boolean)



. ( ContainerControl.Select(Boolean,
Boolean).)

SelectNextControl

. (
Control.)

SendToBack

z-. (
Control.)

SetAutoScrollMargi
n

. (
ScrollableControl.)

SetAutoSizeMode

, ,
, AutoSize . (
Control.)

SetBounds(Int32,
Int32, Int32, Int32)


. ( Control.)

SetBounds(Int32,
Int32, Int32, Int32,
BoundsSpecified)


.( Control.)

SetBoundsCore


. (Control.SetBoundsCore(Int32, Int32, Int32,
Int32, BoundsSpecified).)

SetClientSizeCore

. ,

. ( Control.SetClientSizeCore(Int32, Int32).)

SetDesktopBounds

SetDesktopLocation

SetDisplayRectLoca
tion

. (
ScrollableControl.)

SetScrollState

national . (
ScrollableControl.)

SetStyle

ControlStyles true,
false. ( Control.)

SetTopLevel


. ( Control.)

SetVisibleCore


. (Control.SetVisibleCore(Boolean).)

Show

. (
Control.)

Show(IWin32Wind
ow)

ShowDialog

ShowDialog(IWin3
2Window)

SizeFromClientSize


.( Control.)

SuspendLayout


. ( Control.)

ToString

,
. (Component.ToString.)

Update


.( Control.)

UpdateBounds


.( Control.)

UpdateBounds(Int3
2, Int32, Int32,
Int32)


.( Control.)

UpdateBounds(Int3
2, Int32, Int32,
Int32, Int32, Int32)

,
. ( Control.)

UpdateDefaultButto
n

,
. (ContainerControl.UpdateDefaultButton.)

UpdateStyles


.( Control.)

UpdateZOrder

z-
.( Control.)

Validate


Validating Validated ,
. ( ContainerControl.)

Validate(Boolean)

,
; on,
. ( ContainerControl.)

ValidateChildren

,

. ( ContainerControl.ValidateChildren.)

ValidateChildren(V
alidationConstraints
)

,

. (ContainerControl.ValidateChildren(ValidationCo
nstraints).)

WndProc


. ( ContainerControl.WndProc(Message).)

Activated

.
AutoSizeChanged

AutoSize

AutoValidateChanged

AutoValidate

BackColorChanged


BackColor. ( Control.)

BackgroundImageChanged


BackgroundImage. ( Control.)

BackgroundImageLayoutChanged


BackgroundImageLayout. (
Control.)

BindingContextChanged


BindingContext. ( Control.)

CausesValidationChanged


CausesValidation. ( Control.)

ChangeUICues

,
. (
Control.)

Click


. ( Control.)

ClientSizeChanged


ClientSize. ( Control.)

Closed

, .

Closing

ContextMenuChanged


ContextMenu. ( Control.)

ContextMenuStripChanged


ContextMenuStrip. ( Control.)

ControlAdded


Control.ControlCollection.(
Control.)

ControlRemoved


Control.ControlCollection. (
Control.)

CursorChanged

Cursor. ( Control.)
Deactivate

,
.

Disposed


Dispose. ( Component.)

DockChanged


Dock. ( Control.)

DoubleClick

,
. ( Control.)

DragDrop


. ( Control.)

DragEnter


. ( Control.)

DragLeave

,
. ( Control.)

DragOver

,
. ( Control.)

EnabledChanged

, Enabled
. ( Control.)

Enter


. ( Control.)

FontChanged


Font. ( Control.)

ForeColorChanged


ForeColor. ( Control.)

FormClosed

FormClosing

GiveFeedback


. ( Control.)

GotFocus


. ( Control.)

HandleCreated


. ( Control.)

HandleDestroyed


. ( Control.)

HelpButtonClicked

HelpRequested


. ( Control.)

ImeModeChanged


ImeMode. ( Control.)

InputLanguageChanged

InputLanguageChanging

,
.

Invalidated

,
. ( Control.)

KeyDown

,
. ( Control.)

KeyPress

,
. ( Control.)

KeyUp

, ,
. ( Control.)

Layout

,

. ( Control.)

Leave

,
. ( Control.)

Load

, .

LocationChanged

, Location
. ( Control.)

LostFocus


. ( Control.)

MarginChanged

Margin

MaximizedBoundsChanged


MaximizedBounds

MaximumSizeChanged


MaximumSize

MdiChildActivate

,
MDI MDI.

MenuComplete

MenuStart

MinimumSizeChanged


MinimumSize

MouseCaptureChanged


. ( Control.)

MouseClick


. ( Control.)

MouseDoubleClick


. ( Control.)

MouseDown

,
.(
Control.)

MouseEnter

,
. ( Control.)

MouseHover

,
. ( Control.)

MouseLeave

,
. ( Control.)

MouseMove


. ( Control.)

MouseUp

,

.( Control.)

MouseWheel

,
.(
Control.)

Move


. ( Control.)

PaddingChanged


. ( Control.)

Paint


. ( Control.)

ParentChanged


Parent. ( Control.)

PreviewKeyDown

KeyDown
,
.( Control.)

QueryAccessibilityHelp

, AccessibleObject

. ( Control.)

QueryContinueDrag


,
. ( Control.)

RegionChanged


Region. ( Control.)

Resize


. ( Control.)

ResizeBegin

, .

ResizeEnd

, .

RightToLeftChanged


RightToLeft. ( Control.)

RightToLeftLayoutChanged


RightToLeftLayout

Scroll

, -
. ( ScrollableControl.)

Shown

, .

SizeChanged


Size. ( Control.)

StyleChanged


. ( Control.)

SystemColorsChanged


. ( Control.)

TabIndexChanged

.
TabIndex

TabStopChanged

TabStop

TextChanged

Text. ( Control.)
Validated


. ( Control.)

Validating


. ( Control.)

VisibleChanged


Visible. ( Control.)

IContainerControl.ActivateControl

. (
ContainerControl.)

IDropTarget.OnDragDrop

.
DragDrop. ( Control.)

IDropTarget.OnDragEnter

.
DragEnter. ( Control.)

IDropTarget.OnDragLeave

.
DragLeave. ( Control.)

IDropTarget.OnDragOver

.
DragOver. ( Control.)

a Form
ShowDialog .
FormBorderStyle" AcceptButton" CancelButton" MinimizeBox" MaximizeBox StartP
osition ,
. Add Controls ,
2 Button . HelpButton
.
C#
C++
VB
Public Sub CreateMyForm()
' Create a new instance of the form.
Dim form1 As New Form()
' Create two buttons to use as the accept and cancel buttons.
Dim button1 As New Button()
Dim button2 As New Button()

' Set the text of button1 to "OK".


button1.Text = "OK"
' Set the position of the button on the form.
button1.Location = New Point(10, 10)
' Set the text of button2 to "Cancel".
button2.Text = "Cancel"
' Set the position of the button based on the location of button1.
button2.Location = _
New Point(button1.Left, button1.Height + button1.Top + 10)
' Set the caption bar text of the form.
form1.Text = "My Dialog Box"
' Display a help button on the form.
form1.HelpButton = True
' Define the border style of the form to a dialog box.
form1.FormBorderStyle = FormBorderStyle.FixedDialog
' Set the MaximizeBox to false to remove the maximize box.
form1.MaximizeBox = False
' Set the MinimizeBox to false to remove the minimize box.
form1.MinimizeBox = False
' Set the accept button of the form to button1.
form1.AcceptButton = button1
' Set the cancel button of the form to button2.
form1.CancelButton = button2
' Set the start position of the form to the center of the screen.
form1.StartPosition = FormStartPosition.CenterScreen
' Add button1 to the form.
form1.Controls.Add(button1)
' Add button2 to the form.
form1.Controls.Add(button2)
' Display the form as a modal dialog box.
form1.ShowDialog()
End Sub