1,486
社区成员
发帖
与我相关
我的任务
分享
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Sub Command1_Click()
Dim lngP As Long
Dim strTemprature As String * 10
lngP = FindWindow(vbNullString, "鲁大师")
Call GetWindowText(lngP, strTemprature, Len(strTemprature))
Debug.Print strTemprature
Text1.Text = lngP
Text2.Text = strTemprature
End Sub