Hello
I don't know any C# code, but I could do this in VB, and I expect a similar approach could translate into your language.
I'd do it by addressing the Windows API. Each window on the screen will have a "handle" which is its reference number. The API call "FindWindow" will deliver you the relevant reference. In VB you'd declare the function like this:
Public Declare Function apiFindWindow _
Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Then this would find the window, if you knew its class: (Or you could adapt to find by Name, which would be the text showing in the coloured window bar e.g. Mach3 CSC Licensed to... )
Const cstWinNAme As String = "Mach3 CSC Licensed To:Fill your name in here"
Dim lgHwnd As Long
' Locate top level window
Let lgHwnd = apiFindWindow(vbNullString, cstWinNAme)
Then you can use an API call "GetWindowRect" if you want to know the current window position and dimensions. But since you want to move it you'd use the "MoveWindow" call, which as you see passes in it's first variable as the handle you'd just found, then the X and Y coordinates, in pixels
Public Declare Function apiMoveWindow _
Lib "user32.dll" Alias "MoveWindow" _
(ByVal hWnd As Long, ByVal X As Long, ByVal Y As Long, _
ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
You can play more games as each main application window will have all the objects within it as "Child" windows. There are APIs to enumerate these, and then you can move components around, or click other program's buttons etc.
Hope this helps
Wilfrid Underwood