MessageBox Button Layout is problem in OS zoom 125%

4 posts, 0 answers
  1. Umar
    Umar avatar
    2 posts
    Member since:
    Aug 2015

    Posted 19 Aug 2015 Link to this post

    I am using Telerik Controls Q12013 and it is working fine in default (100%) OS zoom but I am facing Layout problem RadMessageBox with 125% OS zoom in Windows 7.(Desktop [Right click] > Personalization > Display > 125% Zoom). I am facing problem while using Theme "VisualStudio2012Light", "TelerikMetro", and "TelerikMetroBlue" but its working fine in default Office2007 theme. I have attached some images for your better understanding. Kindly look into this issue and I am waiting for your reply.
  2. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 21 Aug 2015 Link to this post

    Hi Umar,

    Thank you for writing.

    If you application is not DPI aware the controls are scaled automatically by the operating system. To handle such cases you need to make your application DPI aware. Detailed information about this is available here: WinForms Scaling at Large DPI Settings–Is It Even Possible?

    In addition, the following snippet shows how you can make the message box bigger:
    public RadForm1()
    {
        InitializeComponent();
        RadMessageBox.Instance.Shown += Instance_Shown;
    }
     
    void Instance_Shown(object sender, EventArgs e)
    {
        RadMessageBox.Instance.MinimumSize = new System.Drawing.Size(500, 500);
         
    }
     
    private void radButton1_Click(object sender, EventArgs e)
    {
        RadMessageBox.Show("test");
    }

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Umar
    Umar avatar
    2 posts
    Member since:
    Aug 2015

    Posted 24 Aug 2015 in reply to Dimitar Link to this post

    This answer does not work for me. MessageBox size has been increase but Issue is still same.

     

     

     

  5. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 26 Aug 2015 Link to this post

    Hi Umar,

    Thank you for writing back.

    If your application is DPI aware the message box will not be scaled automatically (when it is not DPI aware the operating system scales it automatically and this is why it looks a little blurry). I have attached an image that shows the difference.

    If you want your application to remain DPI unaware you can adjust the button position as well:
    private void radButton1_Click(object sender, EventArgs e)
    {
        RadMessageBox.SetThemeName("VisualStudio2012Light");
        RadMessageBox.Instance.Shown += Instance_Shown;
        RadMessageBox.Show("test");
    }
     
    void Instance_Shown(object sender, EventArgs e)
    {
        RadMessageBox.Instance.MinimumSize = new System.Drawing.Size(200, 150);
        RadMessageBoxForm form = sender as RadMessageBoxForm;
        foreach (var item in form.Controls)
        {
            if (item is RadButton)
            {
                ((RadButton)item).Location = new Point(70, 70);
            }
        }
    }

    Let me know if you have additional questions.
     
    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top