Skip to content
Xusinboy Bekchanov edited this page Nov 5, 2023 · 23 revisions

Table of Contents

Definition

Namespace: My.Sys.Forms

Form - A window or dialog box that makes up part of an application's user interface.

Properties

Name Description
ActiveControl Returns/sets the active control on the container control (Windows, Linux).
Align Returns/sets which control borders are docked to its parent control and determines how a control is resized with its parent (Windows, Linux).
AllowDrop Gets or sets a value indicating whether the control can accept data that the user drags onto it (Windows, Linux).
Anchor Returns/sets the edges of the container to which a control is bound and determines how a control is resized with its parent (Windows, Linux).
AutoSize
BackColor Returns/sets the background color used to display text and graphics in an object (Windows, Linux).
BorderStyle Returns/sets the border style of the form (Windows, Linux).
CancelButton Returns/sets the cancel button for dialog, acts on the Esc key (Windows, Linux)
Canvas Canvas is all about drawing in a container (Windows, Linux).
Caption Returns/sets the caption of the control (Windows, Linux).
Constraints Specifies the size constraints for the control (Windows, Linux).
ContextMenu Returns/sets the PopupMenu associated with this control (Windows, Linux).
ControlBox Returns/sets a value indicating whether a Control-menu box is displayed on a form at run time (Windows only)
ControlIndex
Controls Gets the collection of controls contained within the control (Windows, Linux).
Cursor Returns/sets the type of mouse pointer displayed when over part of an object (Windows, Linux).
DefaultButton Returns/sets the default button for dialog, acts on the Enter / Return key (Windows, Linux)
Designer
DesignMode Gets a value that indicates whether the Component is currently in design mode.
DoubleBuffered Gets or sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker (Windows only)
Enabled Returns/sets a value that determines whether an object can respond to user-generated events (Windows, Linux).
ExtraMargins Returns/sets the extra space between controls.
Font Returns a Font object (Windows, Linux).
ForeColor Returns/sets the foreground color used to display text and graphics in an object (Windows, Linux).
FormStyle Determines the form's style (Windows, Linux).
Graphic Returns/sets a graphic to be displayed in a control (Windows, Linux).
Grouped Returns/sets the value indicating the first control of a group of controls (Windows only).
Handle Gets the window handle that the control is bound to.
Height Returns/sets the height of an object.
HelpContext Specifies the default Help file context ID for an object (Windows only).
Hint Returns/sets the text displayed when the mouse is paused over the control (Windows, Linux).
Icon Returns the icon displayed when a form is minimized at run time (Windows, Linux).
ID Gets or sets the programmatic identifier assigned to the control (Windows only).
IsChild Determines whether a window is a child window or descendant window of a specified parent window (Windows only).
KeyPreview Returns/sets whether keyboard events for an object are invoked before keyboard events for controls on that object.
LayoutHandle
Left Returns/sets the distance between the internal left edge of an object and the left edge of its container.
Location Returns/sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.
MainForm Gets or sets the main form for application. (Windows, Linux)
Margins Returns/sets the space between controls.
MaximizeBox Determines whether a form has a Maximize button (Windows only)
Menu Gets or sets the MainMenu that is displayed in the form (Windows, Linux)
MinimizeBox Determines whether a form has a Minimize button (Windows only)
ModalResult Returns/sets the dialog result for the form (Windows, Linux).
Name Returns the name used in code to identify an object.
Opacity Returns/sets the opacity level of the form (Windows, Linux).
Owner Returns/sets the form that owns this form (Windows, Linux).
Parent Returns/sets the parent container of the control (Windows, Linux).
ShowHint Returns/sets the value indicating show hint (Windows, Linux).
Size Returns/sets the height and width of the control.
StartPosition Returns/sets the starting position of the form at run time (Windows, Linux).
SubClass Returs/sets a value indicating type is subclass or not (Windows only).
Tag Stores any extra data needed for your program.
Text Returns/sets the text contained in the control (Windows, Linux).
Top Returns/sets the distance between the internal top edge of an object and the top edge of its container.
Transparent Returns/sets the transparent used to display text and graphics in a form (Windows only).
TransparentColor Returns/sets the transparent color used to display text and graphics in a form (Windows only).
Visible Returns/sets a value that determines whether an object is visible or hidden (Windows, Linux).
Width Returns/sets the width of an object.
WindowState Returns/sets a value that indicates whether form is minimized, maximized, or normal (Windows, Linux).

Methods

Name Description
Add Adds the specified control to the control collection (Windows, Linux).
AddRange Adds the specified controls range to the control collection (Windows, Linux).
BringToFront Brings the control to the front of the z-order (Windows only).
CenterToParent Centers the position of the form within the bounds of the parent form (Windows, Linux).
CenterToScreen Centers the form on the current screen (Windows, Linux).
ClassAncestor Returns ancestor class of control.
ClassName
ClientHeight Returns/sets the height of the client area of the control (Windows, Linux).
ClientToScreen Converts the client-area coordinates of a specified point to screen coordinates (Windows only).
ClientWidth Returns/sets the width of the client area of the control (Windows, Linux).
CloseForm Closes the form (Windows, Linux).
ControlByName Retrieves the Control object from Control name in the collection (Windows, Linux).
ControlCount Gets the number of controls in the Control collection (Windows, Linux).
CreateWnd Creates the window (Windows only)
Focused Returns a value indicating whether the control has input focus (Windows, Linux).
FreeWnd Destroys the specified window handle (Windows, Linux).
FullTypeName Function to get any typename in the inheritance up hierarchy of the type of an instance (address: 'po') compatible with the built-in 'Object' ('baseIndex = 0' to get the typename of the instance) ('baseIndex = -1' to get the base.typename of the instance, or "" if not existing) ('baseIndex = -2' to get the base.base.typename of the instance, or "" if not existing)
GetBounds Gets the bounds of the control to the specified location and size.
GetForm Retrieves the form that the control is on (Windows, Linux).
GetTextLength Determines the length, in characters, of the text associated with a window (Windows, Linux).
GetTopLevel Determines if the control is a top-level control.
Hide Conceals the control from the user.
IndexOf Retrieves the index of a specified Control object in the collection (Windows, Linux).
Invalidate Invalidates the entire surface of the control and causes the control to be redrawn (Windows only).
IsEmpty
Maximize Maximizes the window (Windows, Linux).
Minimize Minimizes the window (Windows, Linux).
ProcessMessage
ReadProperty Reads value from the name of property (Windows, Linux).
RecreateWnd Recreates the window (Windows only)
RegisterClass
Remove Removes the specified control from the control collection (Windows, Linux).
Repaint Forces the control to invalidate its client area and immediately redraw itself and any child controls (Windows, Linux).
RequestAlign Instructs the parent of a control to reposition the control, enforcing its Align property (Windows, Linux).
ScreenToClient Converts the screen coordinates of a specified point on the screen to client coordinates (Windows only).
SelectNextControl Activates the next control (Windows only).
SendToBack Sends the control to the back of the z-order (Windows only).
SetBounds Sets the bounds of the control to the specified location and size.
SetFocus Moves the focus to the specified form or the specified control on the active form (Windows, Linux).
SetMargins Sets the left, top, right, bottom margins for a container control (Windows, Linux).
Show Displays the control to the user (Windows, Linux).
ShowModal Shows the form as a modal dialog box (Windows, Linux).
TopLevelControl Returns the parent control that is not parented by another Forms control. Typically, this is the outermost Form that the control is contained in (Windows, Linux).
ToString Returns a string that represents the current object.
Update Causes the control to redraw the invalidated regions within its client area (Windows, Linux).
UpdateLock Disables drawing in the specified window (Windows only).
UpdateUnLock Enables drawing in the specified window (Windows only).
WriteProperty Writes value to the name of property (Windows, Linux).

Events

Name Description
OnActivate Occurs when the form is activated in code or by the user (Windows, Linux).
OnActivateApp Occurs after a Application instance becomes active (Windows, Linux).
OnActiveControlChange Occurs when changes focus one of the controls on the form (Windows, Linux).
OnClick Occurs when the control is clicked (Windows, Linux, Android, Web).
OnClose Occurs when the form is closed (Windows, Linux).
OnCreate Occurs when the control is created (Windows, Linux).
OnDblClick Occurs when the control is double-clicked (Windows, Linux).
OnDeActivate Occurs when the form loses focus and is no longer the active form (Windows, Linux).
OnDeActivateApp Occurs after a Application instance becomes deactive (Windows, Linux).
OnDestroy Occurs when the control's handle is in the process of being destroyed (Windows, Linux).
OnDropFile Occurs when the user drops a file on the window of an application that has registered itself as a recipient of dropped files (Windows, Linux).
OnGotFocus Occurs when the control receives focus (Windows, Linux).
OnHide Occurs when the Visible property value changes to false (Windows, Linux).
OnKeyDown Occurs when a key is pressed while the control has focus (Windows, Linux).
OnKeyPress Occurs when a character. space or backspace key is pressed while the control has focus (Windows, Linux).
OnKeyUp Occurs when a key is released while the control has focus (Windows, Linux).
OnLostFocus Occurs when the control loses focus (Windows, Linux).
OnMessage Occurs when the window receives a message (Windows, Linux).
OnMouseDown Occurs when the mouse pointer is over the control and a mouse button is pressed (Windows, Linux).
OnMouseEnter Occurs when the mouse pointer enters the control (Windows, Linux).
OnMouseHover Occurs when the mouse pointer rests on the control (Windows only).
OnMouseLeave Occurs when the mouse pointer leaves the control (Windows, Linux).
OnMouseMove Occurs when the mouse pointer is moved over the control (Windows, Linux).
OnMouseUp Occurs when the mouse pointer is over the control and a mouse button is released (Windows, Linux).
OnMouseWheel Occurs when the mouse wheel moves while the control has focus (Windows, Linux).
OnMove Occurs when the control is moved (Windows, Linux).
OnPaint Occurs when the control is redrawn (Windows, Linux).
OnResize Occurs when the control is resized (Windows, Linux).
OnScroll Occurs when the scroll box has been moved by either a mouse or keyboard action (Windows only).
OnShow Occurs when the Visible property value changes to true (Windows, Linux).

See also

Clone this wiki locally