全局申明
'Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
'Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
其他地方
Dim rt As String
Dim cnt As String = GetWindowText(FindWindow("MSTaskListWClass","运行应用程序"), rt, 255)
Output.Show(cnt)
上面代码结果居然是
12349731783049216
正确结果是
运行应用程序
求为什么会这样子