Click here to Skip to main content
13,301,723 members (73,597 online)
Click here to Skip to main content

Stats

196.6K views
13.2K downloads
97 bookmarked
Posted 13 Apr 2007

Localizing System MessageBox

, 2 May 2007
A simple class that allows customizing system's MessageBox window buttons
MessageBoxManager
Properties
bin
Release
MessageBoxManager.dll
MessageBoxManager.pdb
WindowsApplication1
Properties
bin
Release
WindowsApplication1.vshost.exe
MessageBoxManager.dll
MessageBoxManager.pdb
WindowsApplication1.exe
WindowsApplication1.pdb
WindowsApplication2
Properties
bin
Release
WindowsApplication2.vshost.exe
ro
WindowsApplication2.resources.dll
MessageBoxManager.dll
MessageBoxManager.pdb
WindowsApplication2.exe
WindowsApplication2.pdb
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace WindowsApplication2
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ro");


            //Set button text from resources
            MessageBoxManager.OK = LocalResource.OK;
            MessageBoxManager.Cancel = LocalResource.Cancel;
            MessageBoxManager.Retry = LocalResource.Retry;
            MessageBoxManager.Ignore = LocalResource.Ignore;
            MessageBoxManager.Abort = LocalResource.Abort;
            MessageBoxManager.Yes = LocalResource.Yes;
            MessageBoxManager.No = LocalResource.No;

            //Register manager
            MessageBoxManager.Register();


            Application.Run(new Form1());

        }
    }
}

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)

Share

About the Author

Alex C. Duma
Software Developer (Senior)
Romania Romania
No Biography provided

You may also be interested in...

Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171207.1 | Last Updated 2 May 2007
Article Copyright 2007 by Alex C. Duma
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid