-------------------------
Private Sub Command1_Click()
Command1_KeyPress 13
End Sub
--------------------------------
Private Sub Command1_KeyPress(KeyAscii As Integer)
If KeyAscii=13 then
。。。。。。
End If
End Sub
To DTWUJP(建平.net): 看来只能用控件了。
To winiceberg(winiceberg):
是If KeyCode = 13 Then Command1_Click (0)吗?
这方法不能在回车键上使用。
To ywls(yw) :如果焦点在Command1上当然是这样,但如果焦点在Command2上则又如何?