13868.html
来自「VB技巧问答10000例,是一个教程」· HTML 代码 · 共 27 行
HTML
27 行
<html>
<head>
<title>KeyPress 里判断</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>KeyPress 里判断</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by SuBird on June 05, 1999 at 12:00:12:<p>
In Reply to: <a href="13853.html">HELP ! About "ComboBox & Text" !!!!!!!!!!!!</a> posted by Allen on June 04, 1999 at 23:40:19:<p>
Re:<br>1.看不懂<br>2,3. 要做到此功能并不困难只要在 KeyPress 里判断是否按了Enter即可<br>Private Sub Text1_KeyPress(KeyAscii As Integer)<br> if keyascii =13 or Len(Text1.Text) >= 5 then<br> sendkeys "{tab}"<br> keyascii =0 <br> end if<br>end sub<br>'Form的KeyPreview要记得设成True<br>cww有做了一个CEdit可解决以上问题,且蛮好用的,但须等他的站work再说了
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 13868-->
<!--top: 13869--><li><a href="13869.html">补充</a> <b>SuBird</b> <i>12:03:08 6/05/99</i>
(<!--responses: 13869-->0)
<ul><!--insert: 13869-->
</ul><!--end: 13869-->
</ul><!--end: 13868-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?