# KeyPress 里判断

Posted by SuBird on June 05, 1999 at 12:00:12:

In Reply to: HELP ! About "ComboBox & Text" !!!!!!!!!!!! posted by Allen on June 04, 1999 at 23:40:19:

Re:
1.看不懂
2,3. 要做到此功能并不困难只要在 KeyPress 里判断是否按了Enter即可
Private Sub Text1_KeyPress(KeyAscii As Integer)
if keyascii =13 or Len(Text1.Text) >= 5 then
sendkeys "{tab}"
keyascii =0
end if
end sub
'Form的KeyPreview要记得设成True
cww有做了一个CEdit可解决以上问题，且蛮好用的，但须等他的站work再说了

Follow Ups:

- 补充 SuBird 12:03:08 6/05/99 (0)