FunctionKeyコントロールで[F4]キーの動作を実装していても、DateやComboコントロールでドロップダウンが表示されてしまいます。
対象製品
InputMan for .NET 4.0J Windows Forms Edition
詳細
[F4]キーによるドロップダウン表示は、InputMan固有の機能ではなく、Windowsで使用されているショートカットキーに基づいたものです。その他、[F2]キーにて選択オブジェクトの名前を変更、[F10]キーにてメニューバーをアクティブにする、などのショートカットキーがWindowsに予約されています。
これらのショートカットキー機能など、本来の動作を無効にし、独自の動作を実装する場合は、FunctionKeyPressイベントで、e.HandledプロパティをTrueに設定します。
これらのショートカットキー機能など、本来の動作を無効にし、独自の動作を実装する場合は、FunctionKeyPressイベントで、e.HandledプロパティをTrueに設定します。
[VB.NET]
Private Sub FunctionKey1_FunctionKeyPress(ByVal sender As System.Object, ByVal e As GrapeCity.Win.Input.FunctionKeyPressEventArgs) Handles FunctionKey1.FunctionKeyPress
' ファンクションキーに割り付けられた設定を無効にします。
e.Handled = True
If e.Key = GrapeCity.Win.Input.ButtonKeys.F4 Then
' [F4]キーの動作を実装します
End If
End Sub
Private Sub FunctionKey1_FunctionKeyPress(ByVal sender As System.Object, ByVal e As GrapeCity.Win.Input.FunctionKeyPressEventArgs) Handles FunctionKey1.FunctionKeyPress
' ファンクションキーに割り付けられた設定を無効にします。
e.Handled = True
If e.Key = GrapeCity.Win.Input.ButtonKeys.F4 Then
' [F4]キーの動作を実装します
End If
End Sub
[C#]
private void FunctionKey1_FunctionKeyPress(object sender, GrapeCity.Win.Input.FunctionKeyPressEventArgs e)
{
// ファンクションキーに割り付けられた設定を無効にします。
e.Handled = true;
if( e.Key == GrapeCity.Win.Input.ButtonKeys.F4 )
{
// [F4]キーの動作を実装します
}
}
private void FunctionKey1_FunctionKeyPress(object sender, GrapeCity.Win.Input.FunctionKeyPressEventArgs e)
{
// ファンクションキーに割り付けられた設定を無効にします。
e.Handled = true;
if( e.Key == GrapeCity.Win.Input.ButtonKeys.F4 )
{
// [F4]キーの動作を実装します
}
}
この文書は、以前は次のFAQ IDで公開されていました : 9695