Hi all,
I'm trying to capture the text from a popup window (i.e. a MsgBox). The code
:
Const WM_GETTEXT = &HD
Const WM_GETTEXTLENGT H = &HE
Dim lHandle As Long
Dim length As Long
Dim result As Long
Dim strtmp As String
lHandle = FindWindow(vbNu llString, "Some Popup")
If lHandle <> 0 Then
length = SendMessage(lHa ndle, WM_GETTEXTLENGT H, ByVal 0, ByVal 0) + 1
strtmp = Space(length - 1)
result = SendMessage(lHa ndle, WM_GETTEXT, ByVal length, ByVal strtmp)
End If
gives me the title of the popup window ('Some Popup') but not the msg on the
popup. How kan I get the message?
I'm trying to capture the text from a popup window (i.e. a MsgBox). The code
:
Const WM_GETTEXT = &HD
Const WM_GETTEXTLENGT H = &HE
Dim lHandle As Long
Dim length As Long
Dim result As Long
Dim strtmp As String
lHandle = FindWindow(vbNu llString, "Some Popup")
If lHandle <> 0 Then
length = SendMessage(lHa ndle, WM_GETTEXTLENGT H, ByVal 0, ByVal 0) + 1
strtmp = Space(length - 1)
result = SendMessage(lHa ndle, WM_GETTEXT, ByVal length, ByVal strtmp)
End If
gives me the title of the popup window ('Some Popup') but not the msg on the
popup. How kan I get the message?