M
Michael L. Barker
I'm having a bit of a problem working with API, and I was wondering if
anyone has any resouces on the web that might be able to help me?
But, (hehe) I'll post the problem here, maybe someone can help me with
it... (resources still wanted lol) =)
Public Function GetObjectText(ByVal hwnd As Integer) As String
Dim i As Integer
Dim s As String
i = SendMessage(hwnd, WM_GETTEXTLENGTH, 0%, 0%)
s = Space(i + 1)
SendMessage(hwnd, WM_GETTEXT, i + 1, s)
GetObjectText = s
End Function
I get an Overflow error on "i = SendMessage(hwnd, WM_GETTEXTLENGTH,
0%, 0%)" anyone know why? The window that I'm getting the data from
does have text...
"An unhandled exception of type 'System.OverflowException' occurred in
FindWindow.exe
Additional information: Arithmetic operation resulted in an overflow."
Why must it overflow? That's not cool. =)
P.S. wasn't sure what group to use... forgive the cross-post.
Thank you!
~(mm)8>
anyone has any resouces on the web that might be able to help me?
But, (hehe) I'll post the problem here, maybe someone can help me with
it... (resources still wanted lol) =)
Public Function GetObjectText(ByVal hwnd As Integer) As String
Dim i As Integer
Dim s As String
i = SendMessage(hwnd, WM_GETTEXTLENGTH, 0%, 0%)
s = Space(i + 1)
SendMessage(hwnd, WM_GETTEXT, i + 1, s)
GetObjectText = s
End Function
I get an Overflow error on "i = SendMessage(hwnd, WM_GETTEXTLENGTH,
0%, 0%)" anyone know why? The window that I'm getting the data from
does have text...
"An unhandled exception of type 'System.OverflowException' occurred in
FindWindow.exe
Additional information: Arithmetic operation resulted in an overflow."
Why must it overflow? That's not cool. =)
P.S. wasn't sure what group to use... forgive the cross-post.
Thank you!
~(mm)8>