In This Article

BarKeyboardShortcutTextBox Class

Provides a TextBox that accepts keyboard shortcuts for a run-time customize dialog.

[ToolboxBitmap(typeof(BarKeyboardShortcutTextBox))]
public class BarKeyboardShortcutTextBox : TextBox, IDisposable
Inheritance:
object MarshalByRefObject Component Control TextBoxBase TextBox object
Implements:
IDisposable

Constructors

BarKeyboardShortcutTextBox()

Initializes a new instance of the BarKeyboardShortcutTextBox class.

public BarKeyboardShortcutTextBox()

Remarks

The default constructor initializes all fields to their default values.

Properties

ChordKey

Gets or sets the Keys that starts the chord.

[Browsable(false)]
public Keys ChordKey { get; set; }

Property Value

Keys:

The Keys that starts the chord.

Remarks

This value may be null.

DefaultSize

Gets the default size of the control.

protected override Size DefaultSize { get; }

Property Value

Size:

The default Size of the control.

Key

Gets or sets the Keys that is the main shortcut key.

[Browsable(false)]
public Keys Key { get; set; }

Property Value

Keys:

The Keys that is the main shortcut key.

Methods

ClearKeys()

Clears the keys.

public void ClearKeys()

OnKeyDown(KeyEventArgs)

Raises the KeyDown event.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

A KeyEventArgs that contains the event data.

OnKeyPress(KeyPressEventArgs)

Raises the KeyPress event.

protected override void OnKeyPress(KeyPressEventArgs e)
Parameter Type Description
e KeyPressEventArgs

A KeyEventArgs that contains the event data.

OnKeyUp(KeyEventArgs)

Raises the KeyUp event.

protected override void OnKeyUp(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

A KeyEventArgs that contains the event data.

ProcessCmdKey(ref Message, Keys)

Processes a key.

protected override bool ProcessCmdKey(ref Message m, Keys keyData)
Parameter Type Description
m Message

The message to process.

keyData Keys

One of the Keys values that represents the key to process.

Returns

bool:

true if the key was processed by the control; otherwise, false.

Inherited Members