Click here to Skip to main content
14,271,804 members
Rate this:
Please Sign up or sign in to vote.
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:

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

class MsgTest{
    public static void Main(){
        MessageBox.Show("Create Spanish Dictionary");
Updated 18-Sep-14 8:41am
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...

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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.


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100