516.html

来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· HTML 代码 · 共 25 行

HTML
25
字号
<html>  <head>    <title>关于自动选取文字方块...</title>  </head>  <BODY BACKGROUND="" BGCOLOR="white" TEXT="black" LINK="red" VLINK="#808080" ALINK="">    <center>      <h1>关于自动选取文字方块...</h1>    </center><HR><p>Posted by <a href="mailto:chrita@ms10.hinet.net">Chris Lee</a> on August 29, 1997 at 02:20:47:<p>我有另一个不同于小吴先生的做法, 如下:<p>(1) 在 Form 中新增一个 property: ll_GotFocus<p>(2) 该 Text 的 GotFocus Event Code:<p>    ll_GotFocus = True<br>    Text1.SelStart = 0<br>    Text1.SelLength = Len(Text1)<p>(3)  该 Text 的 Click Event Code:<p>    If ll_GotFocus Then<br>        Text1.SelLength = 0<br>        Text1.SelStart = Len(Text1)<br>        ll_GotFocus = False<br>    End If<p>注:<p>(1) 当然, 本方法不影响正常的 Text 选取动作, 亦即: 在 GotFocus 之后, user 可以用 Mouse 选取 Text. 这也是 ll_GotFocus<br>      property 的作用.<p>(2) 本方法的一个缺点是在用 Mouse 去 GotFocus Text 时, 会呈现出 "全选, and then 才全不选" 的状况.<p>Chris Lee, 97/08/29, 16:20 P.M.<br><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 516--><!--top: 523--><li><a href="523.html"><b>Re: 关于自动选取文字方块...</b></a> 小吴 <i>19:52:06 9/01/97</i>(<!--responses: 523-->0)<ul><!--insert: 523--></ul><!--end: 523--></ul><!--end: 516--><br><HR><p></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?