VB声明 | |
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long |
lpClassName | String,指向包含了窗口类名的空中止(C语言)字串的指针;或设为零,表示接收任何类 |
lpWindowName | String,指向包含了窗口文本(或标签)的空中止(C语言)字串的指针;或设为零,表示接收任何窗口标题 |
Dim hw&, cnt&
Dim rttitle As String * 256
hw& = FindWindow("ThunderRT5Main", vbNullString) ' ThunderRTMain under VB4
cnt = GetWindowText(hw&, rttitle, 255)
MsgBox Left$(rttitle, cnt), 0, "RTMain title"