以下是引用bczgvip在2011-4-26 02:19:53的发言:
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Sub Form_Load()
Const SCICALL As String = "SciCalc"
Dim lret As Long
lret = FindWindow(SCICALL, vbNullString)
Do While lret
Debug.Print "SciCalc", Hex$(lret)
lret = FindWindowEx(0, lret, SCICALL, vbNullString)
Loop
End Sub
不知道您这段代码是如何使用的。是一部分,还是完整代码,我复制您的代码,并且运行,没有任何效果。