This is a migrated thread and some comments may be shown as answers.

MessageBox Button Layout is problem in OS zoom 125%

3 Answers 225 Views
MessageBox
This is a migrated thread and some comments may be shown as answers.
Umar
Top achievements
Rank 1
Umar asked on 19 Aug 2015, 09:34 AM
I am using Telerik Controls Q12013 and it is working fine in default (100%) OS but I am facing Layout problem RadMessageBox with 125% OS zoom in Windows 7.(Desktop [Right click] > Personalization > Display > 125% Zoom). I am facing 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.

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 21 Aug 2015, 01:42 PM
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
0
Umar
Top achievements
Rank 1
answered on 24 Aug 2015, 05:41 AM

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

 

 

 

0
Dimitar
Telerik team
answered on 26 Aug 2015, 09:26 AM
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
Tags
MessageBox
Asked by
Umar
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Umar
Top achievements
Rank 1
Share this question
or