I am using the following function and code to try to get the size of a client window in vb.net, I don’t think I have any issues with my Rect structure.
Why do I get this error:
Arithmetic operation resulted in an overflow.
Can you get this to work for me please?
Private Declare Function GetClientRect Lib "user32" (ByVal _
hwnd As IntPtr, ByVal lpRect As Rect) As Boolean
Dim lobbywindow As Long = windowhwnd
Dim lobbyrect As New Rect
GetClientRect(lobbywindow, lobbyrect)
See pinvoke.net/default.aspx/user32.getclientrect for the Rect, as you need to declare a structure for it.