Private Sub FrmLogon_KeyDown(sender As Object, e As KeyDownEventArgs) Handles MyBase.KeyDown
'点击手机退出按钮
If e.KeyCode = KeyCode.Back Then
If toasttime.AddSeconds(3) > DateTime.Now Then
Client.Exit(False)
Else
toasttime = DateTime.Now
Toast("再按一次退出应用", ToastLength.SHORT)
End If
End If
End Sub |