Dear all,
We recently replaced the traditional file menu by a UltraToolbarsManager control in our desktop application and everything works well -- except when we found out one issue that needs to be addressed.
When we use Remote Desktop and run our desktop application, Disconnecting the remote session and THEN reconnecting will cause the desktop application close. It happens when the reconnect happens ( we have code to check and confirmed the app is still running after disconnect ).
Some clues:
Any idea how we can find out what is causing the issue? Thanks very much in advance.
-- Alex
Hi Michael,
Thank you very much for the valuable information. This is exactly what is happening ( i.e. Winform handle change ).
We are embedding a 3rd party exe within an infragistic Panel using window's SetParent() based on the win form's handle as one of the arguments. With the handle refresh after remote desktop reconnect, the embedded application terminates and leave the win form in an unknown state.
Is there anything that we can retain the win form handle? Or is there any reference from Microsoft that we can look for alternatives?
Thanks very much for your help.
Hello Alex,
Is the form closing or minimizing?
When closing out a remote connection to a server operating system. The OS turns off the themes service. As such, our components are notified of the themes change. When it receives this notification, the UltraToolbarsManager (due to its use of the Desktop Window Manager to render aero glass) must force the host form to recreate it's window handle.
The duplication of the form caption and the windowstate change of child forms, is a bug in the framework; not our components. I've attached a sample (without our controls) that demonstrates this. Simply run the application and click the button; You will see the child form now has a Normal state, and the caption is duplicated.
Please adjust the sample to tailor to your application and see if it's the exact issue. Let me know if you have any questions.
5270.WindowsFormsApplication1.zip
One more finding is that, if the main application is launched as mainform.ShowDialog(), it breaks. If it is launched via Application.Run( mainform ) then no crash happens.