Unplanned
Last Updated: 29 Jul 2020 09:34 by ADMIN
Henk
Created on: 29 Jul 2020 06:37
Category: Dock
Type: Bug Report
0
RadDock: application crashes when dropping the form just on the border between two monitors with different DPI scaling

Hi, 

I am trying to make a Winforms app high dpi aware. All seems fine except when using a toolwindow on a raddock. Is there some special to setup when I want a Raddock to also autoscale?

I created a GIF to example the behaviour. The left side is at 15% and the right side just at 100%. I move the form from right to left and back. As you can see most controls get resized, except for the size of the toolwindows in the raddock.

The raddock is the only dock on the form and is set to dock in parrent. 

 

At the end of the gif you can see some behaviour when I place the form over both screens. Then the applications breaks. I get this error:

System.ComponentModel.Win32Exception
  HResult=0x80004005
  Message=Fout bij het maken van de vensterkoppeling. (Translation: Error making window link.)
  Source=System.Windows.Forms
  StackTrace:
   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
   at System.Windows.Forms.Timer.TimerNativeWindow.EnsureHandle()
   at System.Windows.Forms.Timer.TimerNativeWindow.StartTimer(Int32 interval)
   at System.Windows.Forms.Timer.set_Enabled(Boolean value)
   at System.Windows.Forms.Timer.Start()
   at Telerik.WinControls.UI.RadFormControlBase.ScaleControl(SizeF factor, BoundsSpecified specified)
   at System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
   at System.Windows.Forms.Control.Scale(SizeF factor)
   at Telerik.WinControls.UI.RadFormControlBase.HandleDpiChanged()
   at Telerik.WinControls.UI.RadFormControlBase.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Maybe this is normal behaviour, but I still want to mention it, because it is possible that in an work environment, someone might to this from time to time. Maybe not on purpose, but still.

Regariding the high DPI, am I doing something wrong?

Thx.

Henk

 

Attached Files:
1 comment
ADMIN
Dess | Tech Support Engineer, Sr.
Posted on: 29 Jul 2020 09:34

Hello, Henk,

Usually, there is nothing specific in handling the DPI scaling of a ToolWindow compared to RadDock or any other control on the form. It is just necessary to design the application at 100% DPI scaling and make the application DPI aware. The following articles are quite useful on this topic:
https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/dpi-support 
https://docs.telerik.com/devtools/winforms/knowledge-base/hdpi-tips-and-tricks 

I would like to note that we have a known issue regarding the scaling of an auto-hide window. Here is the feedback item for your reference: https://feedback.telerik.com/winforms/1372970-fix-raddock-the-auto-hide-window-is-not-scaled-properly 

However, it doesn't seem to be the case here. RadDock and its windows together with the hosted controls seem to be scaled properly when moving between the monitors. Only the ToolWindow remains with fixed size due to the splitter position of the split container in which the ToolWindow and DocumentWindow are placed. 

I have logged it in our feedback portal by creating a public thread on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

Currently, the possible solution that I can suggest is to adjust the size of the tab strip programmatically as it is demonstrated in the referred feedback item.

I suppose that your left monitor is at 150% DPI scaling, while the right one is at 100%. When you move the form from one monitor and drop it onto anther monitor, it is expected to be scaled according to the target monitor's DPI scaling. According to the provided gif file, it seems that you drop the form just on the border between the two monitors so half of the form is on the left monitor and the other half is on the right monitor. It is not a common scenario. However, I will log it in our feedback portal by creating a public thread on your behalf. We will further investigate it if there is an appropriate way to handle this very specific scenario to avoid crashing the application.

Due to the specificity of the problem, I am unable to suggest a suitable solution.You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have again updated your Telerik points.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik