5681.html
来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· HTML 代码 · 共 31 行
HTML
31 行
<html>
<head>
<title>Re: 请问 SetFocus 与 LostFocus 之间程式控制问题</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: 请问 SetFocus 与 LostFocus 之间程式控制问题</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by <a href="mailto:learner@ksts.seed.net.tw">learner</a> on September 16, 1998 at 07:29:23:<p>
In Reply to: <a href="5625.html">Re: 请问 SetFocus 与 LostFocus 之间程式控制问题</a> posted by AndyLin on September 14, 1998 at 17:02:16:<p>
: : 程式上设 Text1.text 与 Text2.text 一开始Text1.SetFocus 输入完资料后 <br>: : Text1.Lostfocus 检核有误时在判断条件下加 TEXT1.SetFocus 此时无法停<br>: : 留在Text1的栏位上而会至Text2的栏位上(Text2一样有设定LostFocus).<br>: : 请问有无方法控制这种情况 <br>: 建议你在text1,text2事件中设定中断点, 看看程式判断之流程,及lostfocue 和 setfocus 时之顺序,应该可以解决你的问题<p>如果可以的话,贴上你的程式码,我帮你看看,我上次也有遇到这个问题,<br>基本上,你在程式设计时,用中断点去做执行,有时候不会准,而且当你把它编译成执行档<br>时,执行的结果,也可能跟当初设计时的结果不一样<br>程式一开始在TEXT1_GotFocus,当你点到Text2时,你的理想是:Text1_LostFocus -> <br>Text2_GotFocus -> Text2_LostFocus -> Text1_GotFocus<br>可是实际在Run的时候有可能是 Text2_GotFocus -> Text1_LostFocus -> Text2_LostFocus<br>-> Text1_GotFocus<br>所以癈话不多说,你先再 Text2_GotFocus 的第一行加上 DoEvents 试试看<p>以上观念若有错误,敬请指教!
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 5681-->
<!--top: 5720--><li><a href="5720.html">Re: 请问 SetFocus 与 LostFocus 之间程式控制问题</a> <b>jeck</b> <i>22:41:59 9/16/98</i>
(<!--responses: 5720-->1)
<ul><!--insert: 5720-->
<!--top: 5721--><li><a href="5721.html">Re: 请问 SetFocus 与 LostFocus 之间程式控制问题(to learner)</a> <b>jeck</b> <i>22:46:40 9/16/98</i>
(<!--responses: 5721-->0)
<ul><!--insert: 5721-->
</ul><!--end: 5721-->
</ul><!--end: 5720-->
</ul><!--end: 5681-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?