رһҳѧԺ缼 ͼͼ ϵͳ ָ  칫 ý嶯 վӪ ֤ ҳ  web 
 Ϸ QQ 
      վ     

ǰλã  򿪷  VB  رһ 
رһ
ڣ200767 ߣ 鿴:[  С] 

                       

  رһ 
  ʹAPIFindWindowPostMessageѰһڲҹرķʾιرһΪ"Calculator"Ĵڡ 
  Dim winHwnd As Long 
  Dim RetVal As Long 
  winHwnd = FindWindow(vbNullString, "Calculator") 
  Debug.Print winHwnd 
  If winHwnd <> 0 Then 
  RetVal = PostMessage(winHwnd, WM_CLOSE, 0&, 0&) 
  If RetVal = 0 Then 
  MsgBox "Error posting message." 
  End If 
  Else 
  MsgBox "The Calculator is not open." 
  End If 

  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. 

  Declare Function FindWindow Lib "user32" Alias _ 
  "FindWindowA" (ByVal lpClassName As String, _ 
  ByVal lpWindowName As String) As Long 
  Declare Function PostMessage Lib "user32" Alias _ 
  "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _ 
  ByVal wParam As Long, lParam As Any) As Long 
  Public Const WM_CLOSE = &H10 
  

  Ʊҳַͱ⣬͸QQ/Msnĺһ

  رһ £
  رһ
  رһ 
  һƪ:ҵָXYꣿ
  һƪ:õǰĻֱʣ
  رվرֹתصר¿תأעԭʼ
  .°Ȩԭʼ.ڱվתµĸ˺վǱʾл⡣վת
  صаȨϵ༭Ա,ǾԸ. תעԴhttp://www.hackhome.com
ƷƼ
ȵTOP10
  VB+Accessͼϵͳ 
  VBʱͱܵ 
  ؼС洰С仯仯 
  VBѧ±ܼӴ 
  VBʹDirectXļ̳ 
  VBʹEXCEL 
  VBݿԴ60ʵ 
  180VBͼνԴʵ 
  API޸עģ 
  VB쳬Ի˵ 
  ͨſؼMSCommʹ 
  WINDOWSϢ˵ 
  16תʮ, 16תɶƵ 
  vsprintӡʵ 
  webbrowser 2ղأ 
  VB6DataGridʵͨõӱ 
  FindWindow 
  VB̳ ڶ£ؼѧϰ 
  VB6.0ͼ 
  VB֮·ý 
رƼ
  ǳVB.Net Windows Form 
  ׹Ʊ˰ʼ 
  VisualBasic 6еĺִ 
  Զȡû½ƣٽ֤ 
  APIָĿ¼ļ 
  VBݿԴ60ʵ 
  VBIEԶ尴ť 
  VBMS OfficeCOM 
  Visual Basicװ 
  WebComputingADOܽᱨ 
  vsprintӡʵ 
  VBʵһ򵥵ESMTPͻ 
  webbrowser 2ղأ 
  SetForegroundWindow 
  API޸עģ 
  VB쳬Ի˵ 
  WINDOWSϢ˵ 
  ؼС洰С仯仯 
  VBʱͱܵ 
 | () | Ȩ |  | Ϣ Copyright 2003-2007  All Rights Reserved.  
  ICP05018371 35 
