GrapeCity.Win.Editors.v80 アセンブリ > GrapeCity.Win.Editors 名前空間 > GcShortcut クラス : ShortcutKeyDown イベント |
Public Event ShortcutKeyDown As KeyEventHandler
public event KeyEventHandler ShortcutKeyDown
イベント ハンドラが、このイベントに関連するデータを含む、KeyEventArgs 型の引数を受け取りました。次の KeyEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
Alt | Gets a value indicating whether the ALT key was pressed. |
Control | Gets a value indicating whether the CTRL key was pressed. |
Handled | Gets or sets a value indicating whether the event was handled. |
KeyCode | Gets the keyboard code for a System.Windows.Forms.Control.KeyDown or System.Windows.Forms.Control.KeyUp event. |
KeyData | Gets the key data for a System.Windows.Forms.Control.KeyDown or System.Windows.Forms.Control.KeyUp event. |
KeyValue | Gets the keyboard value for a System.Windows.Forms.Control.KeyDown or System.Windows.Forms.Control.KeyUp event. |
Modifiers | Gets the modifier flags for a System.Windows.Forms.Control.KeyDown or System.Windows.Forms.Control.KeyUp event. The flags indicate which combination of CTRL, SHIFT, and ALT keys was pressed. |
Shift | Gets a value indicating whether the SHIFT key was pressed. |
SuppressKeyPress | Gets or sets a value indicating whether the key event should be passed on to the underlying control. |
// Please use the following namespace // using System.Windows.Forms; // using GrapeCity.Win.Editors; public void WireShortcutKeyDownEvent() { // Creates an instace of the GcShortcut component. GcShortcut gcShortcut1 = new GcShortcut(); // Sets the shortcut keys. gcShortcut1.ShortcutKeys.Add(Keys.E | Keys.Control); gcShortcut1.ShortcutKeyDown += new KeyEventHandler(OnGcShortcutShortcutKeyDown); } private void OnGcShortcutShortcutKeyDown(object sender, KeyEventArgs e) { // Displays a message box. MessageBox.Show("Ctrl + E"); // Quit event handling. e.Handled = true; }
' Please use the following namespace ' Imports System.Windows.Forms; ' Imports GrapeCity.Win.Editors; Public Sub WireShortcutKeyDownEvent() ' Creates an instace of the GcShortcut component. Dim gcShortcut1 As New GcShortcut() ' Sets the shortcut keys. gcShortcut1.ShortcutKeys.Add(Keys.E Or Keys.Control) AddHandler gcShortcut1.ShortcutKeyDown, AddressOf OnGcShortcutShortcutKeyDown End Sub Private Sub OnGcShortcutShortcutKeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) ' Displays a message box. MessageBox.Show("Ctrl + E") ' Quit event handling. e.Handled = True End Sub