Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Form closing when disconnect/reconnect from Remote Desktop when app contains a visible UltraToolbarsManager
posted

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:

  1. It happens when remote session RECONNECTS -- not when disconnect;
  2. Only our desktop application closes -- all other apps within the remote session remains; so it should not be remote session timeout;
  3. When UltraToolbarsManager is marked invisible ( visible = false ), it no longer close when reconnect;
  4. When doing this via a Visual Studio debug, we found "System.Windows.Forms.Application.ThreadContext.RunMessageLoop() in Call Stack before System.Windows.Forms.Form.CheckCloseDialog() fires;
  5. We tried to turn on Break on ALL EXCEPTIONS but nothing caught;
  6. We put breakpoints on all codes we added on UltraToolbarsManager events but no luck;

Any idea how we can find out what is causing the issue?  Thanks very much in advance.

-- Alex

Parents Reply
  • 21795
    Offline posted in reply to chen chen

    Please check this forum post where the same issue were discussed.

    Here is what happens when you disconnect from remote desktop. When using remote desktop, the OS recognize the connection and changes the OS theme to disable Aero (glass). UltratoolbarsManager listens for this change, which is broadcasted to all windows when Aero is enabled/disabled. When the Aero is enabled, we would force the form to recreate it's handle and be able to render the glass frame correctly. Unfortunately, the .NET Framework causes modal forms to close when it recreates its handle.

    This is exactly what Michael described in his answer. Also, he has attached a sample with no Infragistics, where the issue is still reproducible.

    As you can see there is nothing we can fix here. The issue is in .NET and not in our components and there is no way to workaround this.

Children
No Data