private void fpSpread1_EditModeOn(object sender, System.EventArgs e)
{
//セルの編集開始のタイミングで各Keyイベントをハンドルします
fpSpread1.EditingControl.KeyDown += new KeyEventHandler(this.fpSpread1_KeyDown);
fpSpread1.EditingControl.KeyPress += new KeyPressEventHandler(this.fpSpread1_KeyPress);
fpSpread1.EditingControl.KeyUp += new KeyEventHandler(this.fpSpread1_KeyUp);
}
private void fpSpread1_EditModeOff(object sender, System.EventArgs e)
{
//セルの編集終了のタイミングで各Keyイベントのハンドルを解除します
fpSpread1.EditingControl.KeyDown -= new KeyEventHandler(this.fpSpread1_KeyDown);
fpSpread1.EditingControl.KeyPress -= new KeyPressEventHandler(this.fpSpread1_KeyPress);
fpSpread1.EditingControl.KeyUp -= new KeyEventHandler(this.fpSpread1_KeyUp);
}
private void fpSpread1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
Console.WriteLine("KeyDownイベント:" + e.KeyCode.ToString());
}
private void fpSpread1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
Console.WriteLine("KeyPressイベント:" + e.KeyChar.ToString());
}
private void fpSpread1_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
{
Console.WriteLine("KeyUpイベント:" + e.KeyCode.ToString());
}
Private Sub FpSpread1_EditModeOn(ByVal sender As Object, ByVal e As System.EventArgs) Handles FpSpread1.EditModeOn
'セルの編集開始のタイミングで各Keyイベントをハンドルします
Dim KeyDownHandler As KeyEventHandler = AddressOf FpSpread1_KeyDown
AddHandler FpSpread1.EditingControl.KeyDown, KeyDownHandler
Dim KeyPressHandler As KeyPressEventHandler = AddressOf FpSpread1_KeyPress
AddHandler FpSpread1.EditingControl.KeyPress, KeyPressHandler
Dim KeyUpHandler As KeyEventHandler = AddressOf FpSpread1_KeyUp
AddHandler FpSpread1.EditingControl.KeyUp, KeyUpHandler
End Sub
Private Sub FpSpread1_EditModeOff(ByVal sender As Object, ByVal e As System.EventArgs) Handles FpSpread1.EditModeOff
'セルの編集終了のタイミングで各Keyイベントのハンドルを解除します
Dim KeyDownHandler As KeyEventHandler = AddressOf FpSpread1_KeyDown
RemoveHandler FpSpread1.EditingControl.KeyDown, KeyDownHandler
Dim KeyPressHandler As KeyPressEventHandler = AddressOf FpSpread1_KeyPress
RemoveHandler FpSpread1.EditingControl.KeyPress, KeyPressHandler
Dim KeyUpHandler As KeyEventHandler = AddressOf FpSpread1_KeyUp
RemoveHandler FpSpread1.EditingControl.KeyUp, KeyUpHandler
End Sub
Private Sub FpSpread1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles FpSpread1.KeyDown
Console.WriteLine("KeyDownイベント:" + e.KeyCode.ToString)
End Sub
Private Sub FpSpread1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles FpSpread1.KeyPress
Console.WriteLine("KeyPressイベント:" + e.KeyChar.ToString)
End Sub
Private Sub FpSpread1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles FpSpread1.KeyUp
Console.WriteLine("KeyUpイベント:" + e.KeyCode.ToString)
End Sub