Click here to Skip to main content
15,881,641 members
Articles / Programming Languages / C#

Localizing System MessageBox

Rate me:
Please Sign up or sign in to vote.
4.81/5 (96 votes)
2 May 2007CPOL4 min read 343.6K   20.7K   108  
A simple class that allows customizing system's MessageBox window buttons
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            MessageBox.Show(LocalResource.ThisIsATest, LocalResource.ThisIsATest, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Software Developer (Senior)
Romania Romania
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions