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

📄 8368.html

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

<hr size=7 width=75%><p>
Posted by <a href="mailto:demon.alex.ng@mailcity.com">七枷社</a> on December 16, 1998 at 18:18:10:<p>
In Reply to: <a href="8352.html">如何送一字串至某一视窗</a> posted by chjichin on December 16, 1998 at 12:50:36:<p>
: 如何送一字串至某一视窗<p>希望下面的程式能帮到你。<p>You can use the FindWindow and PostMessage API functions to find a window and then close it. This example show how you can close down a Window with a caption of "Calculator".<p>Dim winHwnd As Long<br>Dim RetVal As Long<br>winHwnd = FindWindow(vbNullString, "Calculator")<br>Debug.Print winHwnd<br>If winHwnd <> 0 Then<br>    RetVal = PostMessage(winHwnd, WM_CLOSE, 0&, 0&)<br>    If RetVal = 0 Then<br>        MsgBox "Error posting message."<br>    End If<br>Else<br>    MsgBox "The Calculator is not open."<br>End If<br>                    <br>For this code to work, you must have declared the API functions in a module in your project. You must put the following in the declarations section of the module. <p>Declare Function FindWindow Lib "user32" Alias _<br>"FindWindowA" (ByVal lpClassName As String, _<br>ByVal lpWindowName As String) As Long                    <br>Declare Function PostMessage Lib "user32" Alias _<br>"PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _<br>ByVal wParam As Long, lParam As Any) As Long                   <br>Public Const WM_CLOSE = &H10                    <br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 8368-->
<!--top: 8411--><li><a href="8411.html">Re: 如何送一字串至某一视窗</a> <b>chjichin</b> <i>11:51:11 12/18/98</i>
(<!--responses: 8411-->1)
<ul><!--insert: 8411-->
<!--top: 8420--><li><a href="8420.html">Re: 如何送一字串至某一视窗</a> <b>cww</b> <i>16:47:47 12/18/98</i>
(<!--responses: 8420-->0)
<ul><!--insert: 8420-->
</ul><!--end: 8420-->
</ul><!--end: 8411-->
</ul><!--end: 8368-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

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