Our members are dedicated to PASSION and PURPOSE without drama!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
Imports System.Runtime.InteropServices
<System.Runtime.InteropServices.DllImport("user32.dll")> _
Private Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As System.IntPtr
End Function
Dim casinoHwnd As IntPtr
Dim stRect As RECT
'RECT structure
Structure RECT
Public Left As Integer
Public Top As Integer
Public Right As Integer
Public Bottom As Integer
End Structure
<System.Runtime.InteropServices.DllImport("user32")> _
Private Shared Function GetWindowRect(ByVal hwnd As IntPtr, ByRef lpRect As RECT) As IntPtr
End Function
Sub CoordWINDOW()
casinoHwnd = FindWindow(vbNullString, "Casino Window title")
GetWindowRect(casinoHwnd, stRect)
Label2.Text = stRect.Left '#### COORD LEFT (X) WINDOW CASINO
Label1.Text = stRect.Top '#### COORD TOP (Y) WINDOW CASINO
End Sub
Quote from: Drazen on January 19, 2013, 08:51:42 PM
Thanks for sharing and great job for start.
I decided to try it, to endorse your wish for free sharing it, but unfortunately I am having problems running it.
Can you suggest possible solution? I attached screenshot what pops out.
Thanks
Drazen