执行中 按ESC键停止,该如何解决

执行中 按ESC键停止如题,请问如何实现?[解决办法]Private Sub Form1_KeyDown(ByVal sender As System.Obje

执行中 按ESC键停止
如题,请问如何实现?

[解决办法]
Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.Escape Then
Me.Close()
End If
End Sub