Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have what appears to be an obscure bug in MessageBox.Show. I'm using Mono version 3.2.8,
under Kubuntu Linux.

The following C# "program" demonstrates my attempt to display "Create Spanish
Dictionary", which only succeeded in displaying "Create Spanish". The word "Dictionary"
was missing. My attempts at debugging were as follows:

I did not tinker with Fonts.
I ran the program on another Linux computer, with identical results.
If any of the characters v, x, y, or z is inserted anywhere in the string, MessageBox.Show
displays the message correctly.
If the string is converted to uppercase, MessageBox.Show displays the message correctly. Here is the program:

C#
// MsgTest.cs
using System;
using System.Drawing;
using System.Windows.Forms;

class MsgTest{
    public static void Main(){
        MessageBox.Show("Create Spanish Dictionary");
    }
}
Posted
Updated 18-Sep-14 8:41am
v2
Comments
BillWoodruff 18-Sep-14 14:52pm    
Sounds like a Mono on Linux bug: why not report it to Mono on their discussion forums ?
Sergey Alexandrovich Kryukov 18-Sep-14 15:08pm    
Agree. I developed in Mono and was pretty much happy with it, but Forms layout presented a number of problems not observed on .NET. The described problem is not manifested in .NET, too.
I actually suggested some reasonably practical solution, please see...
—SA

1 solution

Please see the comments to the question, by BillWoodruff and mine.

Here is my advice: as Mono apparently have defects related to the issue (try to use the latest version though), you can create your own analog of MessageBox, based on the class System.Windows.Forms.Form. This is not too easy (if you really want to have a very universal component, with self-adjusting layout), and you will face no less defects, but, in contrast to MessageBox, you will have full fine-grain control on your layout; it will help to work around those defects.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900