我想應該是這樣
Me.KeyPreview = True
If ..... Then '判斷輸入到標簽的條件
Label1.Caption = Label1.Caption & KeyAscii
End If
Me.KeyPreview = True
If ..... Then '判斷輸入到標簽的條件
Label1.Caption = Label1.Caption & KeyAscii
End If
调试欢乐多
Private Sub Form_KeyPress(KeyAscii As Integer)
Me.KeyPreview = True
If ..... Then '判斷輸入到標簽的條件
Label1.Caption = Label1.Caption & chr(KeyAscii)
End If
end sub