Files
docs-desktop/dotnet-desktop-guide/framework/winforms/how-to-handle-user-input-events-in-windows-forms-controls.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.5 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
Handle User Input Events in Controls 03/30/2017
csharp
vb
cpp
Windows Forms controls, user input
user input [Windows Forms], Windows Forms controls
3de74dcf-fae3-42d0-92b5-bc04a61a6888

How to: Handle User Input Events in Windows Forms Controls

This example demonstrates how to handle most keyboard, mouse, focus, and validation events that can occur in a Windows Forms control. The text box named TextBoxInput receives the events when it has focus, and information about each event is written in the text box named TextBoxOutput in the order in which the events are raised. The application also includes a set of check boxes that can be used to filter which events to report.

Example

[!code-cppSystem.Windows.Forms.UserInputWalkthrough#0] [!code-csharpSystem.Windows.Forms.UserInputWalkthrough#0] [!code-vbSystem.Windows.Forms.UserInputWalkthrough#0]

Compiling the Code

This example requires:

  • References to the System, System.Drawing and System.Windows.Forms assemblies.

See also