This documentation is archived and is not being maintained.

UpDownCtl Sample: Demonstrates the Windows Forms DomainUpDown and Numeric UpDownControls

Visual Studio .NET 2003

The UpDownCtl sample illustrates Windows Forms in a .NET Framework application, focusing on the properties of the DomainUpDown and NumericUpDown controls:

  • Intercepting arrow keys for changing the value of the control
  • Text alignment
  • Position (left or right alignment) of the up-down control
  • Decimal places and increment size for numeric up-down controls
  • Sorting and wrapping for domain up-down controls

Building and Running the Sample

To build and run UpDownCtl using Visual Studio

  1. In the Visual Studio IDE, open the solution file UpDownCtl.sln.
  2. In Solution Explorer, right-click the UpDownCtl solution.
  3. On the shortcut menu, click Build.
  4. On the Debug menu, click Start.

The application displays a numeric up-down control and a domain up-down control. There are check boxes and other up-down controls for changing the properties. Some of the properties are common to both the numeric up-down control and the domain up-down control. Others are specific to a particular control.

Classes and Keywords

This sample demonstrates the following class:

TrackBar; ProgressBar

This sample demonstrates the following keywords:

DomainUpDown::UpDownAlign; DomainUpDown::TextAlign; DomainUpDown::Items; DomainUpDown::SelectedIndex; DomainUpDown::InterceptArrowKeys; DomainUpDown::Sorted; NumericUpDown::UpDownAlign; NumericUpDown::TextAlign; NumericUpDown::InterceptArrowKeys; NumericUpDown::Increment; NumericUpDown::DecimalPlaces

See Also

Managed Extensions for C++ Samples