⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 8787.html

📁 以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题.对一些VB初学者很用.
💻 HTML
字号:
<html>
  <head>
    <title>Re: 有 lostfocus , 无 getfocus</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>Re: 有 lostfocus , 无 getfocus</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by 洪扬 on January 01, 1999 at 22:04:04:<p>
In Reply to: <a href="8757.html">有 lostfocus , 无 getfocus</a> 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?<p>把 MsgBox() 拿掉之后就正常了!<br>程式一执行之后GetFocus, LostFocus轮流出现,<br>直到堆叠用尽! 程式中断为止!<br>问题是出在 MsgBox() 身上!<br>  
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 8787-->
</ul><!--end: 8787-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

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