# Re: 程式执行到那个物件并不晓的?

Posted by 花生米 on May 27, 1999 at 05:04:40:

In Reply to: 程式执行到那个物件并不晓的? posted by Gordon on May 25, 1999 at 16:52:06:

: : Private Sub Obiect_KeyPress (KeyAscii As Integer)
: : If KeyAscii = 27 Then MsgBox "You pressed the esc ESC key."
: : End Sub

用下列程式码取代试试:

Private Sub Form_KeyDown(keycode As Integer, shift As Integer)
If Keycode = vbKeyEscape Then MsgBox"..."
End Sub

Follow Ups: