每当我按F1时,我都有form1
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
If keyData = Keys.F1 Then
Form2.Show()
Return True
End If
Return MyBase.ProcessCmdKey(msg, keyData)
End Function
form2显示.. 我想要的是当form2启动时,我再次按F1,它关闭 任何的想法?感谢
答案 0 :(得分:0)
只需编写您在Form2中编写的相同代码,然后说出form2.close()
If keyData = Keys.F1 Then
Form2.Close()
Return True
End If