Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C#: Is there a winforms way to make C# MessageBox Buttons (YesNo) larger?

It would be nice to have larger MessageBox Buttons since the target for this application is a tablet.

DialogResult dialogResult = MessageBox.Show(
    message, caption,
    MessageBoxButtons.YesNo,
    MessageBoxIcon.Question,
    MessageBoxDefaultButton.Button2);
switch (dialogResult)
{
    case DialogResult.Yes:
        // ...
like image 440
jacknad Avatar asked Dec 02 '22 03:12

jacknad


1 Answers

It is a system setting. Tablet PCs are normally already configured to make it easy to tap buttons like this so that it works well in any program, not just yours. To configure your tablet, in Win7, use Control Panel + Display, Personalization, Window Color. Click Advanced appearance settings, select "Message Box" in the Item combo. Increase the font size. Don't be fooled by the poor preview, the button will actually grow. There are additional settings in this dialog you might want to tweak to make it easier to manipulate the UI.

like image 151
Hans Passant Avatar answered Dec 03 '22 18:12

Hans Passant