📄 8757.html
字号:
<html>
<head>
<title>有 lostfocus , 无 getfocus</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>有 lostfocus , 无 getfocus</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by jutso on December 31, 1998 at 14:42:24:<p>
我有一个 test 用的程式如下:<p>VERSION 5.00<br>Begin VB.Form Form1 <br> Caption = "Form1"<br> ClientHeight = 2520<br> ClientLeft = 48<br> ClientTop = 312<br> ClientWidth = 3744<br> LinkTopic = "Form1"<br> ScaleHeight = 2520<br> ScaleWidth = 3744<br> StartUpPosition = 3 '系统预设值<br> Begin VB.TextBox Text2 <br> Height = 372<br> Left = 600<br> TabIndex = 1<br> Text = "Text2"<br> Top = 1080<br> Width = 2532<br> End<br> Begin VB.TextBox Text1 <br> Height = 372<br> Left = 600<br> TabIndex = 0<br> Text = "Text1"<br> Top = 360<br> Width = 2532<br> End<br>End<br>Attribute VB_Name = "Form1"<br>Attribute VB_GlobalNameSpace = False<br>Attribute VB_Creatable = False<br>Attribute VB_PredeclaredId = True<br>Attribute VB_Exposed = False<br>Option Explicit<p><br>Private Sub Text1_GotFocus()<p> Debug.Print "text1 getfocus"<p>End Sub<p>Private Sub Text1_LostFocus()<p> Debug.Print "text1 lostfocus"<br> <br> MsgBox "text1 lost focus"<br> <br> Text1.SetFocus<br> <br> DoEvents<br> <p>End Sub<p><br>Private Sub Text2_GotFocus()<p> Debug.Print "text2 getfocus"<p>End Sub<p>Private Sub Text2_LostFocus()<p> Debug.Print "text2 lostfocus"<br> <br> MsgBox "text2 lost focus"<br> <br> Text2.SetFocus<br> DoEvents<p>End Sub<p> 执行后,点一下 text2,只是轮流出现 text1 lostfocus 跟 text2 lostfocus, <br>却都没出现 getfocus 事件,请问没有 getfocus ,怎么会有一大堆 <br>lostfocus?
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 8757-->
<!--top: 8787--><li><a href="8787.html">Re: 有 lostfocus , 无 getfocus</a> <b>洪扬</b> <i>22:04:04 1/01/99</i>
(<!--responses: 8787-->0)
<ul><!--insert: 8787-->
</ul><!--end: 8787-->
<!--top: 8760--><li><a href="8760.html">Re: 有 lostfocus , 无 getfocus</a> <b>Nelson</b> <i>15:19:13 12/31/98</i>
(<!--responses: 8760-->4)
<ul><!--insert: 8760-->
<!--top: 8762--><li><a href="8762.html">Re: 有 lostfocus , 无 getfocus</a> <b>jutso</b> <i>15:28:07 12/31/98</i>
(<!--responses: 8762-->3)
<ul><!--insert: 8762-->
<!--top: 8769--><li><a href="8769.html">Re: 有 lostfocus , 无 getfocus</a> <b>Nelson</b> <i>17:30:12 12/31/98</i>
(<!--responses: 8769-->2)
<ul><!--insert: 8769-->
<!--top: 8777--><li><a href="8777.html">Re: 有 lostfocus , 无 getfocus</a> <b>jutso</b> <i>05:30:03 1/01/99</i>
(<!--responses: 8777-->0)
<ul><!--insert: 8777-->
</ul><!--end: 8777-->
<!--top: 8776--><li><a href="8776.html">Re: 有 lostfocus , 无 getfocus</a> <b>jutso</b> <i>05:29:52 1/01/99</i>
(<!--responses: 8776-->0)
<ul><!--insert: 8776-->
</ul><!--end: 8776-->
</ul><!--end: 8769-->
</ul><!--end: 8762-->
</ul><!--end: 8760-->
<!--top: 8759--><li><a href="8759.html">Re: 有 lostfocus , 无 getfocus</a> <b>jutso</b> <i>15:13:00 12/31/98</i>
(<!--responses: 8759-->0)
<ul><!--insert: 8759-->
</ul><!--end: 8759-->
</ul><!--end: 8757-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -