xtd.forms - Reference Guide  0.1.0
Modern c++17 library containing classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows, Apple macOS and Linux like Ubuntu operating system.
xtd::forms Namespace Reference

The xtd::forms namespace contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system, Apple macOS and Linux like Ubuntu operating system. More...

Namespaces

 layout
 The xtd::forms::layout namespace contains classes for implementing layout behaviors in your form or control.
 

Classes

class  application
 Provides static methods and properties to manage an application, such as methods to start and stop an application, to process Windows messages, and methods to get information about an application. More...
 
class  application_context
 Specifies the contextual information about an application thread. More...
 
class  application_informations
 Specifies the application informations. More...
 
class  button
 Represents a Windows button control. More...
 
class  button_base
 Implements the basic functionality common to button controls. More...
 
class  cancel_event_args
 Provides data for a cancelable event. More...
 
class  check_box
 Represents a Windows check_box. More...
 
class  checked_list_box
 Displays a list_box in which a check box is displayed to the left of each item. More...
 
class  color_dialog
 Represents a common dialog box that displays available colors along with controls that enable the user to define custom colors. More...
 
class  combo_box
 Represents a Windows combo box control. More...
 
class  common_dialog
 Specifies the base class used for displaying dialog boxes on the screen. More...
 
class  component
 Provides the base implementation and enables object sharing between applications. More...
 
class  container_control
 Provides focus-management functionality for controls that can function as a container for other controls. More...
 
class  context_menu
 
class  control
 Defines the base class for controls, which are components with visual representation. More...
 
class  control_event_args
 Provides data for the control_added and control_removed events. More...
 
class  cursor
 Represents the image used to paint the mouse pointer. More...
 
class  cursors
 Provides a collection of Cursor objects for use by a Windows Forms application. More...
 
class  domain_up_down
 
class  file_dialog
 Displays a dialog box from which the user can select a file. More...
 
class  folder_browser_dialog
 
class  font_dialog
 Prompts the user to choose a font from among those installed on the local computer. More...
 
class  form
 Represents a window or dialog box that makes up an application's user interface. More...
 
class  form_closed_event_args
 
class  form_closing_event_args
 
class  group_box
 
class  help_event_args
 Provides data for the control_added and control_removed events. More...
 
class  ibutton_control
 Allows a control to act like a button on a form. More...
 
class  image_list
 
class  imessage_filter
 Defines a message filter interface. More...
 
class  item_check_event_args
 Provides data for the item_check event of the checked_list_box and list_view controls. More...
 
class  iwin32_window
 Provides an interface to expose Win32 HWND handles. More...
 
class  key_event_args
 
class  key_press_event_args
 
class  label
 
class  lcd_label
 
class  list_box
 
class  list_control
 Provides a common implementation of members for the list_box and combo_box classes. More...
 
class  main_menu
 
class  menu
 Represents the base functionality for all menus. More...
 
class  menu_item
 
struct  message
 
class  message_box
 
class  mouse_event_args
 
class  numeric_up_down
 
class  open_file_dialog
 
class  paint_event_args
 
class  panel
 
class  picture_box
 
class  progress_bar
 Represents a Windows progress bar control. More...
 
class  radio_button
 Enables the user to select a single option from a group of choices when paired with other radio_button controls. More...
 
class  save_file_dialog
 
class  screen
 Represents a display device or multiple display devices on a single system. More...
 
class  scroll_bar
 
class  scrollable_control
 
class  switch_button
 
class  system_information
 Provides information about the current system environment. More...
 
class  tab_control
 
class  tab_page
 
class  text_box
 
class  text_box_base
 
class  timer
 
class  track_bar
 Represents a standard Windows track bar. More...
 
class  up_down_base
 
class  up_down_button
 
class  user_control
 

Typedefs

template<typename type_t >
using cancel_event_handler = delegate< void(type_t sender, cancel_event_args &e)>
 Represents the method that handles a cancelable event. More...
 
template<typename type_t >
using control_event_handler = delegate< void(type_t sender, const control_event_args &e)>
 Represents the method that will handle the control_added and control_removed events of the control class. More...
 
using control_ref = std::reference_wrapper< control >
 Represents a control reference. More...
 
template<typename type_t >
using form_closed_event_handler = delegate< void(type_t sender, const form_closed_event_args &e)>
 Represents the method that handles a form_closed event. More...
 
template<typename type_t >
using form_closing_event_handler = delegate< void(type_t, form_closing_event_args &)>
 
using form_collection = std::vector< std::reference_wrapper< form >>
 Represents a collection of form objects. More...
 
template<typename type_t >
using help_event_handler = delegate< void(type_t sender, help_event_args &e)>
 Represents the method that will handle the help_requested event of a control. More...
 
template<typename type_t >
using item_check_event_handler = delegate< void(type_t sender, item_check_event_args &e)>
 Represents the method that will handle the ItemCheck event of a CheckedListBox or ListView control. More...
 
template<typename type_t >
using key_event_handler = delegate< void(type_t, key_event_args &)>
 
template<typename type_t >
using key_press_event_handler = delegate< void(type_t, key_press_event_args &)>
 
using message_loop_callback = delegate< bool()>
 Represents a method that will check whether the hosting environment is still sending messages. More...
 
template<typename type_t >
using mouse_event_handler = delegate< void(type_t, const mouse_event_args &)>
 
template<typename type_t >
using paint_event_handler = delegate< void(type_t, paint_event_args &)>
 

Enumerations

enum  anchor_styles {
  anchor_styles::none = 0b0,
  anchor_styles::top = 0b1,
  anchor_styles::bottom = 0b10,
  anchor_styles::left = 0b100,
  anchor_styles::right = 0b1000
}
 Specifies how a control anchors to the edges of its container. More...
 
enum  appearance {
  appearance::normal = 0,
  appearance::button = 1
}
 Specifies the appearance of a control. More...
 
enum  arrange_direction {
  arrange_direction::down = 0x0004,
  arrange_direction::left = 0x0000,
  arrange_direction::right = 0x0000,
  arrange_direction::up = 0x0004
}
 Specifies the direction the system uses to arrange minimized windows. More...
 
enum  arrange_starting_position {
  arrange_starting_position::bottom_left = 0,
  arrange_starting_position::bottom_right = 1,
  arrange_starting_position::top_left = 2,
  arrange_starting_position::top_right = 3,
  arrange_starting_position::hide = 8
}
 Specifies the starting position that the system uses to arrange minimized windows. More...
 
enum  auto_size_mode {
  auto_size_mode::grow_and_shrink = 0,
  auto_size_mode::grow_only = 1
}
 Specifies how a control will behave when its auto_size property is enabled. More...
 
enum  boot_mode {
  boot_mode::normal = 0,
  boot_mode::fail_safe = 1,
  boot_mode::fail_safe_with_network = 2
}
 Specifies the mode to start the computer in. More...
 
enum  border_style {
  border_style::none = 0,
  border_style::fixed_single = 1,
  border_style::fixed_3d = 2
}
 Specifies the border style for a control. More...
 
enum  bounds_specified {
  bounds_specified::none = 0,
  bounds_specified::x = 0b1,
  bounds_specified::y = 0b10,
  bounds_specified::location = 0b11,
  bounds_specified::width = 0b100,
  bounds_specified::height = 0b1000,
  bounds_specified::size = 0b1100,
  bounds_specified::all = 0b1111
}
 Specifies the bounds of the control to use when defining a control's size and position. More...
 
enum  check_state {
  check_state::unchecked = 0,
  check_state::checked = 1,
  check_state::indeterminate = 2
}
 Specifies the state of a control, such as a check box, that can be checked, unchecked, or set to an indeterminate state. More...
 
enum  close_reason {
  close_reason::none = 0,
  close_reason::windows_shut_down = 1,
  close_reason::mdi_form_closing = 2,
  close_reason::user_closing = 3,
  close_reason::task_manager_closing = 4,
  close_reason::form_owner_closing = 5,
  close_reason::application_exit_call = 6
}
 Specifies the reason that a form was closed. More...
 
enum  combo_box_style {
  combo_box_style::simple = 1,
  combo_box_style::drop_down = 2,
  combo_box_style::drop_down_list = 3
}
 Specifies the combo_box style. More...
 
enum  content_alignment {
  content_alignment::top_left = 0b1,
  content_alignment::top_center = 0b10,
  content_alignment::top_right = 0b100,
  content_alignment::middle_left = 0b10000,
  content_alignment::middle_center = 0b100000,
  content_alignment::middle_right = 0b1000000,
  content_alignment::bottom_left = 0b100000000,
  content_alignment::bottom_center = 0b1000000000,
  content_alignment::bottom_right = 0b10000000000
}
 Specifies alignment of content on the drawing surface. More...
 
enum  control_styles {
  control_styles::none = 0,
  control_styles::container_control = 0b1,
  control_styles::user_paint = 0b10,
  control_styles::opaque = 0b100,
  control_styles::resize_redraw = 0b10000,
  control_styles::fixed_width = 0b100000,
  control_styles::fixed_height = 0b1000000,
  control_styles::standard_click = 0b100000000,
  control_styles::selectable = 0b1000000000,
  control_styles::user_mouse = 0b10000000000,
  control_styles::supports_transparent_back_color = 0b100000000000,
  control_styles::standard_double_click = 0b1000000000000,
  control_styles::all_painting_in_wm_paint = 0b10000000000000,
  control_styles::cache_text = 0b100000000000000,
  control_styles::enable_notify_message = 0b1000000000000000,
  control_styles::double_buffer = 0b10000000000000000,
  control_styles::optimized_double_buffer = 0b100000000000000000,
  control_styles::use_text_for_accessibility = 0b1000000000000000000
}
 Specifies the style and behavior of a control. More...
 
enum  dialog_result {
  dialog_result::none = 0,
  dialog_result::ok = 1,
  dialog_result::cancel = 2,
  dialog_result::abort = 3,
  dialog_result::retry = 4,
  dialog_result::ignore = 5,
  dialog_result::yes = 6,
  dialog_result::no = 7
}
 Specifies identifiers to indicate the return value of a dialog box. More...
 
enum  dock_style {
  dock_style::none = 0,
  dock_style::top = 1,
  dock_style::bottom = 2,
  dock_style::left = 3,
  dock_style::right = 4,
  dock_style::fill = 5
}
 Specifies the position and manner in which a control is docked. More...
 
enum  form_border_style {
  form_border_style::none = 0,
  form_border_style::fixed_single = 1,
  form_border_style::fixed_3d = 2,
  form_border_style::fixed_dialog = 3,
  form_border_style::sizable = 4,
  form_border_style::fixed_tool_window = 5,
  form_border_style::sizable_tool_window = 6
}
 Specifies the border styles for a form. More...
 
enum  form_start_position {
  form_start_position::manual = 0,
  form_start_position::center_screen = 1,
  form_start_position::windows_default_location = 2,
  form_start_position::windows_default_bounds = 3,
  form_start_position::center_parent = 4
}
 Specifies the initial position of a form. More...
 
enum  form_window_state {
  form_window_state::normal = 0,
  form_window_state::minimized = 1,
  form_window_state::maximized = 2,
  form_window_state::full_screen = 3
}
 Specifies how a form window is displayed. More...
 
enum  keys : long long {
  keys::none = 0x00000000,
  keys::lbutton = 0x00000001,
  keys::rbutton = 0x00000002,
  keys::cancel = 0x00000003,
  keys::mbutton = 0x00000004,
  keys::xbutton1 = 0x00000005,
  keys::xbutton2 = 0x00000006,
  keys::back = 0x00000008,
  keys::tab = 0x00000009,
  keys::line_feed = 0x0000000A,
  keys::clear = 0x0000000C,
  keys::ret = 0x0000000D,
  keys::enter = 0x0000000D,
  keys::shift_key = 0x00000010,
  keys::control_key = 0x00000011,
  keys::menu = 0x00000012,
  keys::pause = 0x00000013,
  keys::caps_lock = 0x00000014,
  keys::capital = 0x00000014,
  keys::kana_mode = 0x00000015,
  keys::hanguel_mode = 0x00000015,
  keys::hangul_mode = 0x00000015,
  keys::junja_mode = 0x00000017,
  keys::final_mode = 0x00000018,
  keys::kanji_mode = 0x00000019,
  keys::hanja_mode = 0x00000019,
  keys::escape = 0x0000001B,
  keys::ime_convert = 0x0000001C,
  keys::ime_nonconvert = 0x0000001D,
  keys::ime_accept = 0x0000001E,
  keys::ime_mode_change = 0x0000001F,
  keys::space = 0x00000020,
  keys::page_up = 0x00000021,
  keys::prior = 0x00000021,
  keys::page_down = 0x00000022,
  keys::next = 0x00000022,
  keys::end = 0x00000023,
  keys::home = 0x00000024,
  keys::left = 0x00000025,
  keys::up = 0x00000026,
  keys::right = 0x00000027,
  keys::down = 0x00000028,
  keys::select = 0x00000029,
  keys::print = 0x0000002A,
  keys::execute = 0x0000002B,
  keys::print_screen = 0x0000002C,
  keys::snapshot = 0x0000002C,
  keys::insert = 0x0000002D,
  keys::del = 0x0000002E,
  keys::help = 0x0000002F,
  keys::d0 = 0x00000030,
  keys::d1 = 0x00000031,
  keys::d2 = 0x00000032,
  keys::d3 = 0x00000033,
  keys::d4 = 0x00000034,
  keys::d5 = 0x00000035,
  keys::d6 = 0x00000036,
  keys::d7 = 0x00000037,
  keys::d8 = 0x00000038,
  keys::d9 = 0x00000039,
  keys::a = 0x00000041,
  keys::b = 0x00000042,
  keys::c = 0x00000043,
  keys::d = 0x00000044,
  keys::e = 0x00000045,
  keys::f = 0x00000046,
  keys::g = 0x00000047,
  keys::h = 0x00000048,
  keys::i = 0x00000049,
  keys::j = 0x0000004A,
  keys::k = 0x0000004B,
  keys::l = 0x0000004C,
  keys::m = 0x0000004D,
  keys::n = 0x0000004E,
  keys::o = 0x0000004F,
  keys::p = 0x00000050,
  keys::q = 0x00000051,
  keys::r = 0x00000052,
  keys::s = 0x00000053,
  keys::t = 0x00000054,
  keys::u = 0x00000055,
  keys::v = 0x00000056,
  keys::w = 0x00000057,
  keys::x = 0x00000058,
  keys::y = 0x00000059,
  keys::z = 0x0000005A,
  keys::lwin = 0x0000005B,
  keys::rwin = 0x0000005C,
  keys::apps = 0x0000005D,
  keys::sleep = 0x0000005F,
  keys::num_pad0 = 0x00000060,
  keys::num_pad1 = 0x00000061,
  keys::num_pad2 = 0x00000062,
  keys::num_pad3 = 0x00000063,
  keys::num_pad4 = 0x00000064,
  keys::num_pad5 = 0x00000065,
  keys::num_pad6 = 0x00000066,
  keys::num_pad7 = 0x00000067,
  keys::num_pad8 = 0x00000068,
  keys::num_pad9 = 0x00000069,
  keys::multiply = 0x0000006A,
  keys::add = 0x0000006B,
  keys::separator = 0x0000006C,
  keys::subtract = 0x0000006D,
  keys::decimal = 0x0000006E,
  keys::divide = 0x0000006F,
  keys::f1 = 0x00000070,
  keys::f2 = 0x00000071,
  keys::f3 = 0x00000072,
  keys::f4 = 0x00000073,
  keys::f5 = 0x00000074,
  keys::f6 = 0x00000075,
  keys::f7 = 0x00000076,
  keys::f8 = 0x00000077,
  keys::f9 = 0x00000078,
  keys::f10 = 0x00000079,
  keys::f11 = 0x0000007A,
  keys::f12 = 0x0000007B,
  keys::f13 = 0x0000007C,
  keys::f14 = 0x0000007D,
  keys::f15 = 0x0000007E,
  keys::f16 = 0x0000007F,
  keys::f17 = 0x00000080,
  keys::f18 = 0x00000081,
  keys::f19 = 0x00000082,
  keys::f20 = 0x00000083,
  keys::f21 = 0x00000084,
  keys::f22 = 0x00000085,
  keys::f23 = 0x00000086,
  keys::f24 = 0x00000087,
  keys::num_lock = 0x00000090,
  keys::scroll = 0x00000091,
  keys::lshift_key = 0x000000A0,
  keys::rshift_key = 0x000000A1,
  keys::lcontrol_key = 0x000000A2,
  keys::rcontrol_key = 0x000000A3,
  keys::lmenu = 0x000000A4,
  keys::rmenu = 0x000000A5,
  keys::browser_back = 0x000000A6,
  keys::browser_forward = 0x000000A7,
  keys::browser_refresh = 0x000000A8,
  keys::browser_stop = 0x000000A9,
  keys::browser_search = 0x000000AA,
  keys::browser_favorites = 0x000000AB,
  keys::browser_home = 0x000000AC,
  keys::volume_mute = 0x000000AD,
  keys::volume_down = 0x000000AE,
  keys::volume_up = 0x000000AF,
  keys::media_next_track = 0x000000B0,
  keys::media_previous_track = 0x000000B1,
  keys::media_stop = 0x000000B2,
  keys::media_play_pause = 0x000000B3,
  keys::launch_mail = 0x000000B4,
  keys::select_media = 0x000000B5,
  keys::launch_application1 = 0x000000B6,
  keys::launch_application2 = 0x000000B7,
  keys::oem1 = 0x000000BA,
  keys::oem_semicolon = 0x000000BA,
  keys::oem_plus = 0x000000BB,
  keys::oem_comma = 0x000000BC,
  keys::oem_minus = 0x000000BD,
  keys::oem_period = 0x000000BE,
  keys::oem2 = 0x000000BF,
  keys::oem_question = 0x000000BF,
  keys::oem3 = 0x000000C0,
  keys::oem_tilde = 0x000000C1,
  keys::oem4 = 0x000000DB,
  keys::oem_open_brackets = 0x000000DB,
  keys::oem5 = 0x000000DC,
  keys::oem_pipe = 0x000000DC,
  keys::oem6 = 0x000000DD,
  keys::oem_close_brackets = 0x000000DD,
  keys::oem7 = 0x000000DE,
  keys::oem_quotes = 0x000000DE,
  keys::oem8 = 0x000000DF,
  keys::oem102 = 0x000000DF,
  keys::oem_backslash = 0x000000DF,
  keys::process_key = 0x000000E5,
  keys::packet = 0x000000E7,
  keys::attn = 0x000000F6,
  keys::crsel = 0x000000F7,
  keys::exsel = 0x000000F8,
  keys::erase_eof = 0x000000F9,
  keys::play = 0x000000FA,
  keys::zoom = 0x000000FB,
  keys::no_name = 0x000000FC,
  keys::pa1 = 0x000000FD,
  keys::oem_clear = 0x000000FE,
  keys::command_key = 0x00000100,
  keys::lcommand_key = 0x00000101,
  keys::rcommand_key = 0x00000102,
  keys::shift = 0x00010000,
  keys::control = 0x00020000,
  keys::alt = 0x00040000,
  keys::command = 0x00080000,
  keys::key_code = 0x0000FFFF,
  keys::modifiers = 0xFFFF0000
}
 Specifies key codes and modifiers. More...
 
enum  lcd_style {
  standard,
  seven_segments
}
 
enum  message_box_buttons {
  message_box_buttons::ok = 0,
  message_box_buttons::ok_cancel = 1,
  message_box_buttons::abort_retry_ignore = 2,
  message_box_buttons::yes_no_cancel = 3,
  message_box_buttons::yes_no = 4,
  message_box_buttons::retry_cancel = 5
}
 Specifies constants defining which buttons to display on a message_box. More...
 
enum  message_box_default_button {
  message_box_default_button::button1 = 0,
  message_box_default_button::button2 = 0x00000100L,
  message_box_default_button::button3 = 0x00000200L
}
 Specifies constants defining the default button on a message_box. More...
 
enum  message_box_icon {
  message_box_icon::none = 0,
  message_box_icon::hand = 0x00000010L,
  message_box_icon::stop = 0x00000010L,
  message_box_icon::error = 0x00000010L,
  message_box_icon::question = 0x00000020L,
  message_box_icon::exclamation = 0x00000030L,
  message_box_icon::warning = 0x00000030L,
  message_box_icon::asterisk = 0x00000040L,
  message_box_icon::information = 0x00000040L
}
 Specifies constants defining which information to display. More...
 
enum  message_box_options {
  message_box_options::default_desktop_only = 0x00020000L,
  message_box_options::right_align = 0x00080000L,
  message_box_options::rtl_reading = 0x00100000L,
  message_box_options::service_notification = 0x00200000L
}
 Specifies options on a message_box. More...
 
enum  mouse_buttons {
  mouse_buttons::none = 0,
  mouse_buttons::left = 0x100000,
  mouse_buttons::right = 0x200000,
  mouse_buttons::middle = 0x400000,
  mouse_buttons::x_button1 = 0x800000,
  mouse_buttons::x_button2 = 0x1000000
}
 Specifies constants that define which mouse button was pressed. More...
 
enum  orientation {
  orientation::horzontal = 0,
  orientation::vertical = 1
}
 Specifies the orientation of controls or elements of controls. More...
 
enum  picture_box_size_mode {
  picture_box_size_mode::normal = 0,
  picture_box_size_mode::stretch_image = 1,
  picture_box_size_mode::auto_size = 2,
  picture_box_size_mode::center_image = 3,
  picture_box_size_mode::zoom = 4
}
 Specifies how an image is positioned within a picture_box. More...
 
enum  progress_bar_style {
  progress_bar_style::blocks = 0,
  progress_bar_style::continuous = 1,
  progress_bar_style::marquee = 2
}
 Specifies the progress_bar_style of controls or elements of controls. More...
 
enum  selection_mode {
  selection_mode::none = 0,
  selection_mode::one = 1,
  selection_mode::multi_simple = 2,
  selection_mode::multi_extended = 3
}
 Specifies the selection behavior of a list box. More...
 
enum  tab_alignment {
  tab_alignment::top = 0,
  tab_alignment::bottom = 1,
  tab_alignment::left = 2,
  tab_alignment::right = 3
}
 Specifies the locations of the tabs in a tab control. More...
 
enum  tick_style {
  tick_style::none = 0,
  tick_style::top_left = 1,
  tick_style::bottom_right = 2,
  tick_style::both = 3
}
 Specifies the location of tick marks in a Ttack_bar control. More...
 

Detailed Description

The xtd::forms namespace contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system, Apple macOS and Linux like Ubuntu operating system.

The Switch::System::Windows::Forms namespace contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system, Apple macOS and Linux like Ubuntu operating system.

Typedef Documentation

§ cancel_event_handler

template<typename type_t >
using xtd::forms::cancel_event_handler = typedef delegate<void(type_t sender, cancel_event_args& e)>

Represents the method that handles a cancelable event.

Parameters
senderThe source of the event.
eA cancel_event_args that contains the event data.
Remarks
When you create a cancel_event_handler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event-handler method is called whenever the event occurs, unless you remove the delegate.

§ control_event_handler

template<typename type_t >
using xtd::forms::control_event_handler = typedef delegate<void(type_t sender, const control_event_args& e)>

Represents the method that will handle the control_added and control_removed events of the control class.

Parameters
senderThe source of the event.
eA control_event_args that contains the event data.
Remarks
When you create a control_event_args delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

§ control_ref

using xtd::forms::control_ref = typedef std::reference_wrapper<control>

Represents a control reference.

§ form_closed_event_handler

template<typename type_t >
using xtd::forms::form_closed_event_handler = typedef delegate<void(type_t sender, const form_closed_event_args& e)>

Represents the method that handles a form_closed event.

Parameters
senderThe source of the event.
eA form_closed_event_args that contains the event data.

§ form_collection

using xtd::forms::form_collection = typedef std::vector<std::reference_wrapper<form>>

Represents a collection of form objects.

Remarks
form_collection is used by the application object to list the currently open forms in an application through the open_forms property.

§ help_event_handler

template<typename type_t >
using xtd::forms::help_event_handler = typedef delegate<void(type_t sender, help_event_args& e)>

Represents the method that will handle the help_requested event of a control.

Parameters
senderThe source of the event.
eA help_event_args that contains the event data.
Remarks
When you create a help_event_handler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

§ item_check_event_handler

template<typename type_t >
using xtd::forms::item_check_event_handler = typedef delegate<void(type_t sender, item_check_event_args& e)>

Represents the method that will handle the ItemCheck event of a CheckedListBox or ListView control.

Parameters
senderThe source of the event.
eAn ItemCheckEventArgs that contains the event data.
Remarks
When you create an item_check_event_handler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

§ message_loop_callback

using xtd::forms::message_loop_callback = typedef delegate<bool()>

Represents a method that will check whether the hosting environment is still sending messages.

Returns
true if the hosting environment is still sending messages; otherwise, false.
Remarks
This delegate is used with the application::register_message_loop method.

Enumeration Type Documentation

§ anchor_styles

Specifies how a control anchors to the edges of its container.

Remarks
This enumeration has a flags attribute that allows a bitwise combination of its member values.
When a control is anchored to an edge of its container, the distance between the control and the specified edge remains constant when the container resizes. For example, if a control is anchored to the right edge of its container, the distance between the right edge of the control and the right edge of the container remains constant when the container resizes. A control can be anchored to any combination of control edges. If the control is anchored to opposite edges of its container (for example, to the top and bottom), it resizes when the container resizes. If a control has its anchor property set to none, the control moves half of the distance that the container of the control is resized. For example, if a button has its anchor property set to none and the form that the control is located on is resized by 20 pixels in either direction, the button will be moved 10 pixels in both directions.
Enumerator
none 

The cause of the closure was not defined or could not be determined.

top 

The operating system is closing all applications before shutting down.

bottom 

The parent form of this multiple document interface (MDI) form is closing.

left 

The user is closing the form through the user interface (UI), for example by clicking the Close button on the form window, selecting Close from the window's control menu, or pressing ALT+F4.

right 

The Microsoft Windows Task Manager is closing the application.

§ appearance

Specifies the appearance of a control.

Remarks
Use the members of this enumeration in controls that provide the Appearance property to set its value.
Enumerator
normal 

The default appearance defined by the control class.

button 

The appearance of a Windows button.

§ arrange_direction

Specifies the direction the system uses to arrange minimized windows.

Library
xtd.forms
Remarks
This enumeration has a flags attribute attribute that allows a bitwise combination of its member values.
This enumeration is used by the arrange_direction property of the system_information class.
Enumerator
down 

Arranges vertically, from top to bottom.

left 

Arranges horizontally, from left to right.

right 

Arranges horizontally, from right to left.

up 

Arranges vertically, from bottom to top.

§ arrange_starting_position

Specifies the starting position that the system uses to arrange minimized windows.

Library
xtd.forms
Remarks
This enumeration has a flags attribute attribute that allows a bitwise combination of its member values.
This enumeration is used by the arrange_starting_position property of the systemonformation class.
Enumerator
bottom_left 

Starts at the lower-left corner of the screen, which is the default position.

bottom_right 

Starts at the lower-right corner of the screen.

top_left 

Starts at the upper-left corner of the screen.

top_right 

Starts at the upper-right corner of the screen.

hide 

Hides minimized windows by moving them off the visible area of the screen.

§ auto_size_mode

Specifies how a control will behave when its auto_size property is enabled.

Remarks
Use the members of this enumeration to set the border style for controls that have a changeable border.
Enumerator
grow_and_shrink 

The control grows or shrinks to fit its contents. The control cannot be resized manually.

grow_only 

The control grows as much as necessary to fit its contents but does not shrink smaller than the value of its size property. The form can be resized, but cannot be made so small that any of its contained controls are hidden.

§ boot_mode

enum xtd::forms::boot_mode
strong

Specifies the mode to start the computer in.

Library
xtd::forms
Remarks
This enumeration defines identifiers that represent the standard operating system startup modes.
This enumeration is used by the boot_mode property of the system_information class.
The normal boot mode is the standard system startup mode. The fail_safe boot mode is also called safe mode. The fail_safe_with_network boot mode is also called safe mode with networking.
Enumerator
normal 

Starts the computer in standard mode.

fail_safe 

Starts the computer by using only the basic files and drivers.

fail_safe_with_network 

Starts the computer by using the basic files, drivers and the services and drivers necessary to start networking.

§ border_style

Specifies the border style for a control.

Remarks
Use the members of this enumeration to set the border style for controls that have a changeable border.
Enumerator
none 

No border.s.

fixed_single 

A single-line border.

fixed_3d 

A three-dimensional border.

§ bounds_specified

Specifies the bounds of the control to use when defining a control's size and position.

This enumeration has a flags attribute that allows a bitwise combination of its member values.

Remarks
Use the members of this enumeration when calling the set_bounds_core and set_bounds methods of the control class.
Enumerator
none 

No border.s.

Specifies that the left edge of the control is defined.

Specifies that the top edge of the control is defined.

location 

Specifies that both the x and y coordinates of the control are defined.

width 

Specifies that the width of the control is defined.

height 

Specifies that the height of the control is defined.

size 

Specifies that both the width and height property values of the control are defined.

all 

Specifies that both the location and size property values are defined.

§ check_state

Specifies the state of a control, such as a check box, that can be checked, unchecked, or set to an indeterminate state.

Remarks
Multiple methods in check_box, checked_list_box, and item_check_event_args use this enumeration.
Note
Use an indeterminately checked control when you do not want to set a default value.
Enumerator
unchecked 

The control is unchecked.

checked 

The control is checked.

indeterminate 

The control is indeterminate. An indeterminate control generally has a shaded appearance.

§ close_reason

Specifies the reason that a form was closed.

Remarks
The FormClosing and FormClosed events are raised when a Form is closed, either through user action or programmatically. Handlers for these events receive parameters of type FormClosingEventArgs and FormClosedEventArgs, respectively. Both of these event argument classes use the CloseReason enumeration.
Enumerator
none 

The cause of the closure was not defined or could not be determined.

windows_shut_down 

The operating system is closing all applications before shutting down.

mdi_form_closing 

The parent form of this multiple document interface (MDI) form is closing.

user_closing 

The user is closing the form through the user interface (UI), for example by clicking the Close button on the form window, selecting Close from the window's control menu, or pressing ALT+F4.

task_manager_closing 

The Microsoft Windows Task Manager is closing the application.

form_owner_closing 

The owner form is closing.

application_exit_call 

The Exit method of the Application class was invoked.

§ combo_box_style

Specifies the combo_box style.

Remarks
When a control is docked to an edge of its container, it is always positioned flush against that edge when the container is resized. If more than one control is docked to an edge, the controls appear side by side according to their z-order; controls higher in the z-order are positioned farther from the container's edge.
If left, right, top, or bottom is selected, the specified and opposite edges of the control are resized to the size of the containing control's corresponding edges. If fill is selected, all four sides of the control are resized to match the containing control's edges.
The drop_down_style property specifies whether the list is always displayed or whether the list is displayed in a drop-down. The drop_down_style property also specifies whether the text portion can be edited.
Enumerator
simple 

Specifies that the list is always visible and that the text portion is editable. This means that the user can enter a new value and is not limited to selecting an existing value in the list.

drop_down 

Specifies that the list is displayed by clicking the down arrow and that the text portion is editable. This means that the user can enter a new value and is not limited to selecting an existing value in the list. When using this setting, the append value of auto_complete_mode works the same as the suggest_append value. This is the default style.

drop_down_list 

Specifies that the list is displayed by clicking the down arrow and that the text portion is not editable. This means that the user cannot enter a new value. Only values already in the list can be selected. The list displays only if auto_complete_mode is suggest or suggest_append.

§ content_alignment

Specifies alignment of content on the drawing surface.

Enumerator
top_left 

Content is vertically aligned at the top, and horizontally aligned on the left.

top_center 

Content is vertically aligned at the top, and horizontally aligned at the center.

top_right 

Content is vertically aligned at the top, and horizontally aligned on the right.

middle_left 

Content is vertically aligned in the middle, and horizontally aligned on the left.

middle_center 

Content is vertically aligned at the middle, and horizontally aligned at the center.

middle_right 

Content is vertically aligned at the middle, and horizontally aligned on the right.

bottom_left 

Content is vertically aligned in the bottom, and horizontally aligned on the left.

bottom_center 

Content is vertically aligned at the bottom, and horizontally aligned at the center.

bottom_right 

Content is vertically aligned at the bottom, and horizontally aligned on the right.

§ control_styles

Specifies the style and behavior of a control.

Remarks
This enumeration has a flags attribute that allows a bitwise combination of its member values.
Controls use this enumeration in various properties and methods to specify functionality. A control can enable a style by calling the set_style method and passing in the appropriate control_styles bit (or bits) and the bool value to set the bit(s) to. For example, the following line code would enable double-buffering.
my_control.set_style(control_styles::user_paint | control_styles::all_painting_in_wm_paint | double_buffer, true);
If the all_painting_in_wm_paint bit is set to true, the window message WM_ERASEBKGND is ignored, and both on_paint_background and on_paint methods are called directly from the window message WM_PAINT. This generally reduces flicker unless other controls send the window message WM_ERASEBKGND to the control. You might send the window message WM_ERASEBKGRND to achieve a pseudo-transparent effect similar to supports_transparent_back_color; for example, a tool_bar with flat appearance does this.
To fully enable double-buffering, you can set the optimized_double_buffer and all_painting_in_wm_paint bits to true. However the preferred method for enabling double buffering, which yields the same result, is to set the double_buffered property for the control to true.
If the supports_transparent_back_color bit is set to true, and the back_color is set to a color whose alpha component is less than 255, on_paint_background will simulate transparency by asking its parent control to paint the background. This is not true transparency.
Note
If there is another control between the control and its parent, the current control will not show the control in the middle.
Remarks
When the user_mouse bit is set to true, the following methods are still called: control::on_mouse_down, control::on_mouse_up, control::on_mouse_enter, control::on_mouse_move, control::on_mouse_hover, control::on_mouse_leave, and control::on_mouse_wheel.
When the control is clicked, if the standard_click bit is set to true the control::on_click method is called and it raises the control::click event. When the control is double-clicked, and both the standard_click and standard_double_click bits are set to true, the click is passed on to the double_click event. Then the Control::on_double_click method is called and it raises the control::double_click event. However, the control can call on_click or on_double_click directly regardless of the standard_click and standard_double_click bit values. For more information on control click and double click behaviors, see the control::click and control::double_click topics.
When the use_text_for_accessibility bit is set and there is a value in the control's text property, the value of that control's text property determines the control's default active accessibility name and shortcut key. Otherwise, the text of the preceding label control will be used instead. This style is set by default. Certain built-in control types, such as text_box and combo_box, reset this style so that the text property of those controls will not be used by active accessibility.
Enumerator
none 

No control style..

container_control 

If true, the control is a container-like control.

user_paint 

If true, the control paints itself rather than the operating system doing so. If false, the paint event is not raised. This style only applies to classes derived from control.

opaque 

If true, the control is drawn opaque and the background is not painted.

resize_redraw 

If true, the control is redrawn when it is resized.

fixed_width 

If true, the control has a fixed width when auto-scaled. For example, if a layout operation attempts to rescale the control to accommodate a new font, the control's width remains unchanged.

fixed_height 

If true, the control has a fixed height when auto-scaled. For example, if a layout operation attempts to rescale the control to accommodate a new font, the control's height remains unchanged.

standard_click 

If true, the control implements the standard click behavior.

selectable 

If true, the control can receive focus.

user_mouse 

If true, the control does its own mouse processing, and mouse events are not handled by the operating system.

supports_transparent_back_color 

If true, the control accepts a BackColor with an alpha component of less than 255 to simulate transparency. Transparency will be simulated only if the UserPaint bit is set to true and the parent control is derived from Control.

standard_double_click 

If true, the control implements the standard double_click behavior. This style is ignored if the standard_click bit is not set to true.

all_painting_in_wm_paint 

If true, the control ignores the window message WM_ERASEBKGND to reduce flicker. This style should only be applied if the user_paint bit is set to true.

cache_text 

If true, the control keeps a copy of the text rather than getting it from the handle each time it is needed. This style defaults to false. This behavior improves performance, but makes it difficult to keep the text synchronized.

enable_notify_message 

If true, the on_notify_message(message&) method is called for every message sent to the control's wnd_proc(message&). This style defaults to false. enable_notify_message does not work in partial trust.

double_buffer 

If true, drawing is performed in a buffer, and after it completes, the result is output to the screen. Double-buffering prevents flicker caused by the redrawing of the control. If you set double_buffer to true, you should also set user_paint and all_painting_in_wm_paint to true.

optimized_double_buffer 

If true, the control is first drawn to a buffer rather than directly to the screen, which can reduce flicker. If you set this property to true, you should also set the all_painting_in_wm_paint to true.

use_text_for_accessibility 

Specifies that the value of the control's text property, if set, determines the control's default active accessibility name and shortcut key.

§ dialog_result

Specifies identifiers to indicate the return value of a dialog box.

Remarks
The Button.DialogResult property and the form.show_dialog method use this enumeration.
Examples
The following code example demonstrates how to display a MessageBox with the options supported by this overload of Show. After verifying that a string variable, ServerName, is empty, the example displays a MessageBox, offering the user the option to cancel the operation. If the Show method's return value evaluates to Yes, the form that displayed the MessageBox is closed.
void validate_user_entry() {
// Checks the value of the text.
if (server_name.text().size() == 0) {
// Initializes the variables to pass to the MessageBox.Show method.
string message = "You did not enter a server name. Cancel this operation?";
string caption = "No Server Name Specified";
dialog_result result;
// Displays the MessageBox.
result = message_box::show(*this, message, caption, buttons);
if (result == dialog_result::yes) {
// Closes the parent form.
this->close();
}
}
}
Enumerator
none 

Nothing is returned from the dialog box. This means that the modal dialog continues running.

ok 

The dialog box return value is OK (usually sent from a button labeled OK).

cancel 

The dialog box return value is Cancel (usually sent from a button labeled Cancel).

abort 

The dialog box return value is Abort (usually sent from a button labeled Abort).

retry 

The dialog box return value is Retry (usually sent from a button labeled Retry).

ignore 

The dialog box return value is Ignore (usually sent from a button labeled Ignore).

yes 

The dialog box return value is Yes (usually sent from a button labeled Yes).

no 

The dialog box return value is No (usually sent from a button labeled No).

§ dock_style

Specifies the position and manner in which a control is docked.

Remarks
When a control is docked to an edge of its container, it is always positioned flush against that edge when the container is resized. If more than one control is docked to an edge, the controls appear side by side according to their z-order; controls higher in the z-order are positioned farther from the container's edge.
If left, right, top, or bottom is selected, the specified and opposite edges of the control are resized to the size of the containing control's corresponding edges. If fill is selected, all four sides of the control are resized to match the containing control's edges.
Enumerator
none 

The control is not docked.

top 

The control's top edge is docked to the top of its containing control.

bottom 

The control's bottom edge is docked to the bottom of its containing control.

left 

The control's left edge is docked to the left edge of its containing control.

right 

The control's right edge is docked to the right edge of its containing control.

fill 

All the control's edges are docked to the all edges of its containing control and sized appropriately.

§ form_border_style

Specifies the border styles for a form.

Remarks
This enumeration is used by the form class. It represents the different styles of the form. The default style is sizable.
Enumerator
none 

No border.

fixed_single 

A fixed, single-line border.

fixed_3d 

A fixed, three-dimensional border.

fixed_dialog 

A thick, fixed dialog-style border.

sizable 

A resizable border.

fixed_tool_window 

A tool window border that is not resizable. A tool window does not appear in the taskbar or in the window that appears when the user presses ALT+TAB. Although forms that specify fixed_tool_window typically are not shown in the taskbar, you must also ensure that the show_in_taskbar property is set to false, since its default value is true.

sizable_tool_window 

A resizable tool window border. A tool window does not appear in the taskbar or in the window that appears when the user presses ALT+TAB.

§ form_start_position

Specifies the initial position of a form.

Remarks
This enumeration is used by the start_position property of the form class. It represents the different start positions of the form. The default start position is windows_default_location.
Enumerator
manual 

The position of the form is determined by the Location property.

center_screen 

The form is centered on the current display, and has the dimensions specified in the form's size.

windows_default_location 

The form is positioned at the Windows default location and has the dimensions specified in the form's size.

windows_default_bounds 

The form is positioned at the Windows default location and has the bounds determined by Windows default.

center_parent 

The form is centered within the bounds of its parent form.

§ form_window_state

Specifies how a form window is displayed.

Remarks
This enumeration is used by the form class. It represents the different states of the form. The default state is normal.
Enumerator
normal 

A default sized window.

minimized 

A minimized window.

maximized 

A maximized window.

full_screen 

A full screen window.

§ keys

enum xtd::forms::keys : long long
strong

Specifies key codes and modifiers.

Remarks
The keys class contains constants for processing keyboard input. The members of the keys enumeration consist of a key code and a set of modifiers combined into a single integer value. In the Win32 application programming interface (API) a key value has two halves, with the high-order bits containing the key code (which is the same as a Windows virtual key code), and the low-order bits representing key modifiers such as the SHIFT, CONTROL, and ALT keys.
Warning
Do not use the values in this enumeration for combined bitwise operations. The values in the enumeration are not mutually exclusive.
Note
This enumeration provides no way to test whether the CAPS LOCK or NUM LOCK keys are currently activated. You can use one of the following techniques to determine if these keys are activated:
  • Call the IsKeyLocked method of the Control class.
  • For finer control, use the Win32 API functions GetKeyState, GetAsyncKeyState, or GetKeyboardState defined in user32.dll, to do this. For more information about calling native functions, see Consuming Unmanaged DLL Functions.
Remarks
The following table shows the key code values represented by two enumerated values, representing both the general original equipment manufacturer (OEM) keys and the more specific U.S.-keyboard associations.
Hexadecimal value  U.S. keyboard General OEM
BA oem_semicolon oem1
 BF  oem_question oem2
C0 oem_tilde oem3
 DB  oem_open_brackets oem4
 DC  oem_pipe oem5
DD  oem_close_brackets oem6
DE  oem_quotes oem7
E2  oem_backslash oem102
Examples
The following code example uses the KeyDown event to determine the type of character entered into the control.
// bool flag used to determine when a character other than a number is entered.
bool non_number_entered = false;
// Handle the KeyDown event to determine the type of character entered into the control.
void text_box1_key_down(const control& sender, key_event_args& e) {
// Initialize the flag to false.
non_number_entered = false;
// Determine whether the keystroke is a number from the top of the keyboard.
if (e.key_code() < keys::d0 || e.key_code() > keys::d9) {
// Determine whether the keystroke is a number from the keypad.
if (e.key_code() < keys::num_pad0 || e.key_code() > keys::num_pad9) {
// Determine whether the keystroke is a backspace.
if(e.key_code() != keys::back) {
// A non-numerical keystroke was pressed.
// Set the flag to true and evaluate in key_press event.
non_number_entered = true;
}
}
}
//If shift key was pressed, it's not a number.
if (control::modifier_keys() == keys::Shift) {
non_number_entered = true;
}
}
// This event occurs after the KeyDown event and can be used to prevent
// characters from entering the control.
void text_box1_key_press(const control& sender, key_press_event_args& e) {
// Check for the flag being set in the key_down event.
if (non_number_entered == true) {
// Stop the character from being entered into the control since it is non-numerical.
e.handled(true);
}
}
Enumerator
none 

No key pressed.

lbutton 

The left mouse button.

rbutton 

The right mouse button.

cancel 

The CANCEL key.

mbutton 

The middle mouse button (three-button mouse).

xbutton1 

The first x mouse button (five-button mouse).

xbutton2 

The second x mouse button (five-button mouse).

back 

The BACK key.

tab 

The TAB key.

line_feed 

The LINEFEED key.

clear 

The CLEAR key.

ret 

The RETURN key.

enter 

The ENTER key.

shift_key 

The SHIFT key.

control_key 

The CTRL key.

menu 

The ALT key.

pause 

The PAUSE key.

caps_lock 

The CAPS LOCK key.

capital 

The CAPS LOCK key.

kana_mode 

The IME Kana mode key.

hanguel_mode 

The IME Hanguel mode key. (maintained for compatibility; use HangulMode)

hangul_mode 

The IME Hangul mode key.

junja_mode 

The IME Junja mode key.

final_mode 

The IME Final mode key.

kanji_mode 

The IME Kanji mode key.

hanja_mode 

The IME Hanja mode key.

escape 

The ESC key.

ime_convert 

The IME convert key.

ime_nonconvert 

The IME nonconvert key.

ime_accept 

The IME accept key.

ime_mode_change 

The IME mode change key.

space 

The SPACEBAR key.

page_up 

The PAGE UP key.

prior 

The PAGE UP key.

page_down 

The PAGE DOWN key.

next 

The PAGE DOWN key.

end 

The END key.

home 

The HOME key.

left 

The LEFT key.

up 

The UP key.

right 

The RIGHT key.

down 

The DOWN key.

select 

The SELECT key.

print 

The PRINT key.

execute 

The EXECUTE key.

print_screen 

The PRINT SCREEN key.

snapshot 

The PRINT SCREEN key.

insert 

The INSERT key.

del 

The DEL key.

help 

The HELP key.

d0 

The 0 key.

d1 

The 1 key.

d2 

The 2 key.

d3 

The 3 key.

d4 

The 4 key.

d5 

The 5 key.

d6 

The 6 key.

d7 

The 7 key.

d8 

The 8 key.

d9 

The 9 key.

The A key.

The B key.

The C key.

The D key.

The E key.

The F key.

The G key.

The H key.

The I key.

The J key.

The K key.

The L key.

The M key.

The N key.

The O key.

The P key.

The Q key.

The R key.

The S key.

The T key.

The U key.

The V key.

The W key.

The X key.

The Y key.

The Z key.

lwin 

The left Windows logo key (Microsoft Natural Keyboard).

rwin 

The right Windows logo key (Microsoft Natural Keyboard).

apps 

The application key (Microsoft Natural Keyboard).

sleep 

The computer sleep key.

num_pad0 

The 0 key on the numeric keypad.

num_pad1 

The 1 key on the numeric keypad.

num_pad2 

The 2 key on the numeric keypad.

num_pad3 

The 3 key on the numeric keypad.

num_pad4 

The 4 key on the numeric keypad.

num_pad5 

The 5 key on the numeric keypad.

num_pad6 

The 6 key on the numeric keypad.

num_pad7 

The 7 key on the numeric keypad.

num_pad8 

The 8 key on the numeric keypad.

num_pad9 

The 9 key on the numeric keypad.

multiply 

The multiply key.

add 

The add key.

separator 

The separator key.

subtract 

The subtract key.

decimal 

The decimal key.

divide 

The divide key.

f1 

The F1 key.

f2 

The F2 key.

f3 

The F3 key.

f4 

The F4 key.

f5 

The F5 key.

f6 

The F6 key.

f7 

The F7 key.

f8 

The F8 key.

f9 

The F9 key.

f10 

The F10 key.

f11 

The F11 key.

f12 

The F12 key.

f13 

The F13 key.

f14 

The F14 key.

f15 

The F15 key.

f16 

The F16 key.

f17 

The F17 key.

f18 

The F18 key.

f19 

The F19 key.

f20 

The F20 key.

f21 

The F21 key.

f22 

The F22 key.

f23 

The F23 key.

f24 

The F24 key.

num_lock 

The NUM LOCK key.

scroll 

The SCROLL LOCK key.

lshift_key 

The left SHIFT key.

rshift_key 

The right SHIFT key.

lcontrol_key 

The left CTRL key.

rcontrol_key 

The right CTRL key.

lmenu 

The left ALT key.

rmenu 

The right ALT key.

browser_back 

The browser back key.

browser_forward 

The browser forward key.

browser_refresh 

The browser refresh key.

browser_stop 

The browser stop key.

browser_search 

The browser search key.

browser_favorites 

The browser favorites key.

browser_home 

The browser home key.

volume_mute 

The volume mute key.

volume_down 

The volume down key.

volume_up 

The volume up key.

media_next_track 

The media next track key.

media_previous_track 

The media previous track key.

media_stop 

The media stop key.

media_play_pause 

The media play pause key.

launch_mail 

The launch mail key.

select_media 

The select media key.

launch_application1 

The start application one key.

launch_application2 

The start application two key.

oem1 

The OEM 1 key.

oem_semicolon 

The OEM Semicolon key on a US standard keyboard.

oem_plus 

The OEM plus key on any country/region keyboard.

oem_comma 

The OEM comma key on any country/region keyboard.

oem_minus 

The OEM minus key on any country/region keyboard.

oem_period 

The OEM period key on any country/region keyboard.

oem2 

The OEM 2 key.

oem_question 

The OEM question mark key on a US standard keyboard.

oem3 

The OEM 3 key.

oem_tilde 

The OEM tilde key on a US standard keyboard.

oem4 

The OEM 4 key.

oem_open_brackets 

The OEM open bracket key on a US standard keyboard.

oem5 

The OEM 5 key.

oem_pipe 

The OEM pipe key on a US standard keyboard.

oem6 

The OEM 6 key.

oem_close_brackets 

The OEM close bracket key on a US standard keyboard.

oem7 

The OEM 7 key.

oem_quotes 

The OEM singled/double quote key on a US standard keyboard.

oem8 

The OEM 8 key.

oem102 

The OEM 102 key.

oem_backslash 

The OEM angle bracket or backslash key on the RT 102 key keyboard.

process_key 

The PROCESS KEY key.

packet 

Used to pass Unicode characters as if they were keystrokes. The Packet key value is the low word of a 32-bit virtual-key value used for non-keyboard input methods.

attn 

The ATTN key.

crsel 

The CRSEL key.

exsel 

The EXSEL key.

erase_eof 

The ERASE EOF key.

play 

The PLAY key.

zoom 

The ZOOM key.

no_name 

A constant reserved for future use.

pa1 

The PA1 key.

oem_clear 

The CLEAR key.

command_key 

The CMD key.

lcommand_key 

The left CMD key.

rcommand_key 

The right CMD key.

shift 

The SHIFt modifier key.

control 

The CTRL modifier key.

alt 

The ALT modifier key.

command 

The CMD modifier key.

key_code 

The bitmask to extract a key code from a key value.

modifiers 

The bitmask to extract modifiers from a key value.

§ message_box_buttons

Specifies constants defining which buttons to display on a message_box.

Remarks
This enumeration is used by the message_box class.
Enumerator
ok 

The message box contains an OK button.

ok_cancel 

The message box contains OK and Cancel buttons.

abort_retry_ignore 

&brief The message box contains Abort, Retry, and Ignore buttons

yes_no_cancel 

The message box contains Yes, No, and Cancel buttons.

yes_no 

The message box contains Yes and No buttons.

retry_cancel 

The message box contains Retry and Cancel buttons.

§ message_box_default_button

Specifies constants defining the default button on a message_box.

Remarks
This enumeration is used by the message_box class.
Enumerator
button1 

The first button on the message box is the default button.

button2 

The second button on the message box is the default button.

button3 

The third button on the message box is the default button.

§ message_box_icon

Specifies constants defining which information to display.

Remarks
This enumeration is used by the message_box class. The description of each member of this enumeration contains a typical representation of the symbol. The actual graphic displayed is a function of the operating system constants. In current implementations there are four unique symbols with multiple values assigned to them.
Enumerator
none 

The message box contain no symbols.

hand 

The message box contains a symbol consisting of a white X in a circle with a red background.

stop 

The message box contains a symbol consisting of white X in a circle with a red background.

error 

The message box contains a symbol consisting of white X in a circle with a red background.

question 

The message box contains a symbol consisting of a question mark in a circle. The question-mark message icon is no longer recommended because it does not clearly represent a specific type of message and because the phrasing of a message as a question could apply to any message type. In addition, users can confuse the message symbol question mark with Help information. Therefore, do not use this question mark message symbol in your message boxes. The system continues to support its inclusion only for backward compatibility.

exclamation 

The message box contains a symbol consisting of an exclamation point in a triangle with a yellow background.

warning 

The message box contains a symbol consisting of an exclamation point in a triangle with a yellow background.

asterisk 

The message box contains a symbol consisting of a lowercase letter i in a circle.

information 

The message box contains a symbol consisting of a lowercase letter i in a circle.

§ message_box_options

Specifies options on a message_box.

Remarks
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
This enumeration is used by the MessageBox class.
If you do not want to specify this parameter when calling methods on MessageBox, you can pass in 0 instead.
Enumerator
default_desktop_only 

The message box is displayed on the active desktop.

right_align 

The message box text is right-aligned.

rtl_reading 

Specifies that the message box text is displayed with right to left reading order.

service_notification 

The message box is displayed on the active desktop.

§ mouse_buttons

Specifies constants that define which mouse button was pressed.

This enumeration has a flag attribute that allows a bitwise combination of its member values.

Remarks
This enumeration is used by many classes, including ax_host, control, data_grid, form, radio_button, splitter, status_bar, and up_down_base.
Enumerator
none 

No mouse button was pressed.

left 

The left mouse button was pressed.

right 

The right mouse button was pressed.

middle 

he middle mouse button was pressed.

x_button1 

The first XButton (XBUTTON1) on Microsoft IntelliMouse Explorer was pressed.

x_button2 

The second XButton (XBUTTON2) on Microsoft IntelliMouse Explorer was pressed.

§ orientation

Specifies the orientation of controls or elements of controls.

Remarks
Use the members of this enumeration to set the border style for controls that have a changeable border.
Enumerator
horzontal 

The control or element is oriented horizontally.

vertical 

The control or element is oriented vertically.

§ picture_box_size_mode

Specifies how an image is positioned within a picture_box.

Remarks
Use the members of this enumeration to set the value of the size_mode property of the picture_box.
Enumerator
normal 

The image is placed in the upper-left corner of the picture_box. The image is clipped if it is larger than the picture_box it is contained in.

stretch_image 

The image within the picture_box is stretched or shrunk to fit the size of the picture_box.

auto_size 

The picture_box is sized equal to the size of the image that it contains.

center_image 

The image is displayed in the center if the picture_box is larger than the image. If the image is larger than the picture_box, the picture is placed in the center of the picture_box and the outside edges are clipped.

zoom 

The size of the image is increased or decreased maintaining the size ratio.

§ progress_bar_style

Specifies the progress_bar_style of controls or elements of controls.

Remarks
You can use the marquee style when you need to indicate progress is being made, but you cannot indicate the quantity of progress. The marquee style is valid only when visual styles are enabled. The Continuous style is valid only when visual styles are not enabled.
Enumerator
blocks 

Indicates progress by increasing the number of segmented blocks in a progress_bar.

continuous 

Indicates progress by increasing the size of a smooth, continuous bar in a progress_bar.

marquee 

Indicates progress by continuously scrolling a block across a progress_bar in a marquee fashion.

§ selection_mode

Specifies the selection behavior of a list box.

Remarks
This enumeration is used by classes such as list_box and chacked_list_box.
Enumerator
none 

No items can be selected.

one 

Only one item can be selected.

multi_simple 

Multiple items can be selected.

multi_extended 

Multiple items can be selected, and the user can use the SHIFT, CTRL, and arrow keys to make selections.

§ tab_alignment

Specifies the locations of the tabs in a tab control.

Remarks
This enumeration is used by members such as tab_control::alignment.
Enumerator
top 

The tabs are located across the top of the control.

bottom 

The tabs are located across the bottom of the control.

left 

The tabs are located along the left edge of the control.

right 

The tabs are located along the right edge of the control.

§ tick_style

Specifies the location of tick marks in a Ttack_bar control.

Remarks
Use the members of this enumeration to set the value of the tick_style property of the track_bar control.
Enumerator
none 

No tick marks appear in the control.

top_left 

Tick marks are located on the top of a horizontal control or on the left of a vertical control.

bottom_right 

Tick marks are located on the bottom of a horizontal control or on the right side of a vertical control.

both 

Tick marks are located on both sides of the control.