Closed dahall closed 5 years ago
Hi,
ok I worked a little bit on this issue and found out this is the explaination:
Currently it's not allowed to paint in a DC on RDP sessions or secure desktop (e.g. UAC). I wrote a short wrapper arround the direct calls with exception handling. This works for my TS use case very well. I will add this as patch :-)
Dirk
Originally posted: 2011-09-04T02:20:15
Corrected in the 1.1 release.
Originally posted: 2011-09-08T12:05:13
He,
I use my Wizard also on Windows 2003 without all this nice Aero features. Everytime when I disconnect or minimize my RDP session and went back later the following exception is thrown:
t System.Drawing.Graphics.Clear(Color color)
at AeroWizard.ThemedTableLayoutPanel.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I digged into this and trying to use this workaround the prevent the exception window:
if (!this.IsDesignMode() && SupportGlass && DesktopWindowManager.IsCompositionEnabled())
{
try
{
e.Graphics.Clear(System.Drawing.Color.Black);
}
catch (Exception)
{ }
}
Are you an idea how we can prevent this error?
Thanks
Dirk
Originally posted: 2011-09-04T01:14:40