Code: Select all
Public Class MyEventReceiver
Implements IEventReceiver
Public Function OnEvent(ByVal e As [Event]) As Boolean Implements IEventReceiver.OnEvent
If e.Type = EventType.KeyInput Then
If e.Key = 32 Then
driver.EndScene()
device.CloseDevice()
Environment.Exit(-1)
End If
End If
End Function
End Class