主题:求教FORM的KEYDOWN事件
我的程序里想实现一个特定按键响应事件的操作,我新建一个工程来测试时(其他什么代码都没用,就只有弹出个MSGBOX显示按键代码),是可以响应的。但在需要的工程中却没反应,我对过两个FORM的属性,除了一个最大化大小一个默认大小以外,都是一样的,请问这是何解?
代码如下:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 33: Call cc1
Case 34: Call cc2
Else: MsgBox "1"
End Select
End Sub
FORM_LOAD的代码如下,不知有没有关系:
Private Sub Form_Load()
cs = 0
k = False
T.Enabled = False
T1.Enabled = False
SS = 0
L.Visible = False
l2.Visible = False
L3.Visible = False
add = App.Path & "\db.mdb"
de1.Connection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= '" + add + "';Persist Security Info=False"
End Sub
麻烦知道的朋友指点一下,谢谢
代码如下:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 33: Call cc1
Case 34: Call cc2
Else: MsgBox "1"
End Select
End Sub
FORM_LOAD的代码如下,不知有没有关系:
Private Sub Form_Load()
cs = 0
k = False
T.Enabled = False
T1.Enabled = False
SS = 0
L.Visible = False
l2.Visible = False
L3.Visible = False
add = App.Path & "\db.mdb"
de1.Connection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= '" + add + "';Persist Security Info=False"
End Sub
麻烦知道的朋友指点一下,谢谢