Maximise RadRibbonForm issue on dual monitor setup

1 Answer 21 Views
Form General Discussions RibbonBar
Toby
Top achievements
Rank 3
Iron
Iron
Toby asked on 13 Jul 2022, 05:11 PM | edited on 13 Jul 2022, 05:38 PM

Hi, I have an issue such that when I place my application (which is based on a RadRibbonForm) on to my right hand 4K monitor and then maximise it I get a small amount of "bleed" of my application on to the right hand side of my left monitor.

On inspecting the forms desktop bounds property it see X = 1908, Y = -12, width = 3864, height = 2114. I was expecting X = 1920, Y = 0, width = 3840, height = 2090 which is what is being reported in Screen.AllScreens.

I'm using the lastest version of WinForms and have done what issuggested in this link.

I can reproduce the same behaviour when I run "Demo Application - Telerik UI for WinForms R2 2022 SP1", move it to my large right hand monitor then maximise it.

Do you know of any "easy" way of saving and restoring the main application window size / position in a multi monitor setup with diferrent DPI's? Its a nightmare!

Kind regards
Toby

1 Answer, 1 is accepted

Sort by
1
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 15 Jul 2022, 12:11 PM

Hi, Toby,

I was able to replicate the same behavior on my end when maximizing the Demo application on my monitor with higher than 100% DPI scaling. The maximized form overlaps a little bit the next monitor. It seems to be an internal known issue. However, 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, due to the nature of the issue the possible solution that I can suggest is to use WindowState.Normal and specify the form's size according to the size of the current monitor. A sample approach is demonstrated here: 

        public RadForm1()
        {
            InitializeComponent();
            this.SizeChanged += RadForm1_SizeChanged;
        }
        
        private void RadForm1_SizeChanged(object sender, EventArgs e)
        {
            if (this.WindowState == FormWindowState.Maximized)
            {
                Screen screen = Screen.FromControl(this);
                int screenWidth = screen.WorkingArea.Width;
                int screenHeight = screen.WorkingArea.Height;
                this.WindowState = FormWindowState.Normal;
                this.DesktopLocation = new  Point(screen.Bounds.Left,screen.Bounds.Top); 
                this.Size = new Size(screenWidth, screenHeight);
            }
        }

Please excuse us for the inconvenience caused. We will do our best to introduce a fix accordingly.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Form General Discussions RibbonBar
Asked by
Toby
Top achievements
Rank 3
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or