Dear All,
We are trying to launch a remote app using mstsc (with the help of RDP file) and controlling the size and position of application using Windows APIs. Resize and reposition happens fine when we use MoveWindow API, but after this mouse events are not properly propagated to RemoteApp. Mouse events on RemoteApp are propagated to older position (before MoveWindow) of application.
Observation steps:
1. Configured and launched a notepad as RemoteApp using RDP file.
2. Positioned RemoteApp using MoveWindow API
SetWindowLong(MainWindowHandle, GWL_STYLE, WS_VISIBLE);
Point windowPosition = this.PointToScreen(new Point(0, 0));
MoveWindow(MainWindowHandle, windowPosition.X, windowPosition.Y, this.Width, this.Height, true);
SetForegroundWindow(MainWindowHandle);
NB: Here MainWindowHandle is RemoteApp window handle (mstsc.exe process main handle)
3. Now we can see RemoteApp repositioned fine but mouse events are not properly propagated to RemoteApp(mstsc.exe)
- Mouse events we can see a shift in mouse click.
If we manually resize the RemoteApp mouse events are propagating properly. Problem comes when we reposition RemoteApp windows using any one of the Windows API's.
Please let me know if any body come accross this scenario or if any one is having suggestion/openion on this.
Thanks
Bachu