I have a program running on my PC that controls a Mac via TeamViewer. It all works fine except that sending a mouseclick requires TeamViewer to be in foreground. I have code that sends mouseclicks to programs like Notepad where the edit panel is called "Edit." But the TeamViewer panel is called TV_REMOTEDESKTOP_CLASS and FindWindowEx fails to find it's handle.
Spy++ says this is the correct name or am I wrong?
How can I simulate a click to tp TeamViewer in the background?
Here is my code:
IntPtr handle = WinGetHandle("axie_machine");
if (handle != IntPtr.Zero)
{
var panel = FindWindowEx(handle, IntPtr.Zero, "TV_REMOTEDESKTOP_CLASS", null);
PerformRightClick(panel, new Point(200, 200));
}