The MinimumSize property gets or sets the minimum size of the control. The MultilineChanged event occurs when the Multiline property is changed. The Multiline property controls whether the text of the edit control can span more than one line. The ReadOnly property controls whether the text in the edit control can be changed or not. Answered by:. Archived Forums. Windows Forms General.
Sign in to vote. I created a simple textbox on a form - nothing else, and I want to have the program do things when I press the "Enter" key after typing in data to the textbox. Friday, November 2, PM. Perhaps your event handler is not 'hooked up'? For example, you can do this: 1. Click on the textBox1 control in the designer. Open the Properties panel and click on the Events tab. The ApplicationExit event of the Application class is raised after the shutdown events of the main form.
Startup and WindowsFormsApplicationBase. When you change the focus by using the mouse or by calling the Focus method, focus events of the Control class occur in the following order:.
Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. NotifyInvalidate Rectangle. OnClick EventArgs. OnCursorChanged EventArgs. OnDockChanged EventArgs. OnDoubleClick EventArgs. OnDragLeave EventArgs. OnEnabledChanged EventArgs. OnEnter EventArgs. OnFontChanged EventArgs. OnGotFocus EventArgs. OnHandleCreated EventArgs. OnHandleDestroyed EventArgs. OnInvalidated InvalidateEventArgs. OnLayout LayoutEventArgs.
OnLeave EventArgs. OnLocationChanged EventArgs. OnLostFocus EventArgs. OnMarginChanged EventArgs. OnModifiedChanged EventArgs. OnMouseEnter EventArgs. OnMouseHover EventArgs. OnMouseLeave EventArgs. OnMove EventArgs. OnMultilineChanged EventArgs. OnNotifyMessage Message.
Notifies the control of Windows messages. OnPaddingChanged EventArgs. This method is not relevant for this class. OnPaint PaintEventArgs.
Paints the background of the control. OnParentChanged EventArgs. OnPrint PaintEventArgs. OnRegionChanged EventArgs. OnResize EventArgs. OnSizeChanged EventArgs. OnStyleChanged EventArgs. OnTextChanged EventArgs. OnValidated EventArgs. OnValidating CancelEventArgs. OnVisibleChanged EventArgs. Paste String. Sets the selected text to the specified text without clearing the undo buffer.
Forces the control to apply layout logic to all its child controls. PerformLayout Control, String. PointToClient Point. Computes the location of the specified screen point into client coordinates. PointToScreen Point.
Computes the location of the specified client point into screen coordinates. PreProcessControlMessage Message. Preprocesses keyboard or input messages within the message loop before they are dispatched.
PreProcessMessage Message. ProcessCmdKey Message, Keys. Processes a command key. ProcessDialogChar Char. Processes a dialog character. ProcessDialogKey Keys. Processes a dialog key. ProcessKeyEventArgs Message.
Processes a key message and generates the appropriate control events. ProcessKeyMessage Message. Processes a keyboard message. ProcessKeyPreview Message.
Previews a keyboard message. ProcessMnemonic Char. Processes a mnemonic character. Raises the appropriate drag event. Raises the appropriate key event. Raises the appropriate mouse event. Raises the appropriate paint event. Forces the re-creation of the handle for the control.
RectangleToClient Rectangle. Computes the size and location of the specified screen rectangle in client coordinates. RectangleToScreen Rectangle. Computes the size and location of the specified client rectangle in screen coordinates. Provides constants for rescaling the control when a DPI change occurs.
Resumes usual layout logic. ResumeLayout Boolean. Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests. RtlTranslateAlignment ContentAlignment. RtlTranslateAlignment HorizontalAlignment. RtlTranslateContent ContentAlignment.
RtlTranslateHorizontal HorizontalAlignment. Scale Single. Scales the control and any child controls. Scale Single, Single.
Scales the entire control and any child controls. Scale SizeF. Scales the control and all child controls by the specified scaling factor. Scales a logical bitmap value to it's equivalent device unit value when a DPI change occurs. Scales a control's location, size, padding and margin. ScaleCore Single, Single. Scrolls the contents of the control to the current caret position. Activates the control. Select Boolean, Boolean.
Select Int32, Int Selects a range of text in the text box. Selects all text in the text box. Activates the next control. Sends the control to the back of the z-order. Sets the bounds of the control to the specified location and size. Sets the specified bounds of the control to the specified location and size. Sets the size of the client area of the control.
SetStyle ControlStyles, Boolean. SetTopLevel Boolean. Sets the control as the top-level control. SetVisibleCore Boolean. Sets the control to the specified visible state. Displays the control to the user.
SizeFromClientSize Size. Determines the size of the entire control from the height and width of its client area. Temporarily suspends the layout logic for the control. Undoes the last edit operation in the text box. Causes the control to redraw the invalidated regions within its client area. Updates the bounds of the control with the current size and location. Updates the bounds of the control with the specified size and location.
Updates the bounds of the control with the specified size, location, and client size. Forces the assigned styles to be reapplied to the control. Updates the control in its parent's z-order. WndProc Message. Occurs when the focus or keyboard user interface UI cues change. Occurs when the text box is clicked. Occurs when the control is double-clicked. Occurs when a drag-and-drop operation is completed.
Occurs when an object is dragged into the control's bounds. Occurs when an object is dragged out of the control's bounds. Occurs when an object is dragged over the control's bounds. Occurs when the control is entered. Occurs during a drag operation. Occurs when the control receives focus. Occurs when a handle is created for the control. Occurs when the control's handle is in the process of being destroyed.
Occurs when the user requests help for a control. Occurs when a control's display requires redrawing. Occurs when a key is pressed while the control has focus. Occurs when a character. Occurs when a key is released while the control has focus.
Occurs when a control should reposition its child controls. Occurs when the input focus leaves the control.
0コメント