5556.html

来自「VB技巧问答10000例,是一个教程」· HTML 代码 · 共 23 行

HTML
23 行
字号
<html>
  <head>
    <title>Re: 如何按Esc让Form消失?</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>Re: 如何按Esc让Form消失?</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by AndyLin on September 11, 1998 at 16:58:16:<p>
In Reply to: <a href="5537.html">Re: 如何按Esc让Form消失?</a> posted by Linus on September 11, 1998 at 10:39:25:<p>
: : <br>: : : 请问如何写按下Esc后让Form Unload或执行一个sub?<p>: : ..在已GetFocus的物件上的KeyPress事件上判断<br>: :   if KeyAcsii=27 then<br>: :       unload me<br>: :   end if<br>: :      <br>: 我在Form_KeyPress()试过,但是不行<p>试试看在 keydown 事件中加入下列程式码<br>:   if Keycode=vbkeyescape then<br>: :       unload me<br>: :   end if<br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 5556-->
</ul><!--end: 5556-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

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