.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to Localize Windows Forms and Change the Language at Runtime

Posted By: Syed Shakeer Hussain     Posted Date: July 15, 2010    Points: 2   Category :Windows Application
Localization is the process of customizing your application to a particular language, culture or locale. Visual Studio provides support for localizing Windows Forms with much ease. In this article, we will see how to localize windows forms and give the user the ability to change to his preferred language at runtime.
When you run a localized application, the appearance is determined by two culture values. The UICulture property is used to specify which resource files will be loaded for the form. The Culture property, on the other hand, determines how strings such as dates, numerals, and currency amounts are formatted.
Let us see the steps required to create a localized form. You can then expand this example and adopt the same approach for the rest of the forms in your project

View Complete Post

More Related Resource Links

Windows Forms: .NET Framework 1.1 Provides Expanded Namespace, Security, and Language Support for Yo


With the much-anticipated release of the .NET Framework 1.1, developers are eager to know what's been added to their programming bag of tricks. In this article, the author focuses on new developments in Windows Forms, such as namespace additions, support for hosting managed controls in unmanaged clients, and designer support for C++ and J#. Integrated access to the Compact Framework and new mobile code security settings also make this release noteworthy. Along with these features, the author reviews the best ways to handle multiple versions of the common language runtime and highlights some potential pitfalls.

Chris Sells

MSDN Magazine March 2003

Change from Forms Authentication to Windows Authentication

What do I need to do in order to change an application from Forms Authentication to windows authentication?

Windows.Forms.Label size change issue



In a Windows Forms application developed with VB2008 Express, Label controls change size the first time the .Text property is updated.


On a Windows XP Pro SP3 system where the app was developed the labels retain the size set at design time.  On other systems, one also Windows XP, one Windows 7, labels shrink (all to the same size independent of content) the first time their .Text property is updated.  Labels that do not have their .Text property updated retain their design size.

Additional information:

The labels all occur within a FixedPanel of a SplitContainer.
Salient properties for the Label controls:
Anchor: Top, Left
AutoSize: False
BorderStyle: FixedSingle
Dock: None
Enabled: True
FlatStyle: Standard
Image: None
Locked: False
Margin: 0,0,0,0

System.Windows.Forms.WebBrowser unable to update or change


I am using this WebBrowser component in a C# project.

I have declared and use "_wb" as shown below::

string httpcmd = @"https://...........";

System.Windows.Forms.WebBrowser _wb = new System.Windows.Forms.WebBrowser();                
_wb.ScriptErrorsSuppressed = false;                
Uri myuri = new Uri(httpcmd);
_wb.Url = myuri;
while (_wb.ReadyState != System.Windows.Forms.WebBrowserReadyState.Complete)


The above code in within a class.

Once my program uses the above code once, it then does seem possible to change.

i.e. After the first iteration, nothing changes each time the code is run.

The DocumentText property I reference stays the same once it is set.

It is like the URI is not even re-sent.

Only if I close the application and then re-run then the webbroweser will update as desired.

I have seen many references to this problem but have not been able to resolved it.

Can anyone suggest how to get this componet to reset or clear so it behaves like I have re-run the application?


Windows Forms ActiveX not loading in .NET 4.0 (IEHost.dll omitted in runtime 4.0)



I have some complexed situation with .NET 4.0 integration.

Our application is a .NET standalone browser (WPF) installed on clients computers.

That browser host many tabs with HTML, kind of our own IE.

On some of the ASP/HTML pages there are object elements which host a .NET user control (with third party).

*** Everything was perfect when we were using .NET version lower than 4.0

Few weeks ago we moved our browser to .NET 4.0 and these hosted controls stopped working.


I was reading all about security changes in .NET 4.0 and then so many articles about sandboxing in .NET 4.0

Now, i think that i perfectly understand what is the problem:

Our WPF browser running in .NET 4.0 CLR and it doesn't include the IEhost.dll so nothing is going to download our user controls to client machines and we are stuck.

Please confirm if my imagination is correct.

And solution is:

I started thinking about the fastest solution and i found it in WindowsFormsHost control in XBAP web page.

So actually i'm going to put my user control into the XBAP object and then integrate it to our WebSite and ASP page.

error CS0570: 'System.Windows.Forms.MessageBoxButtons.OK' is not supported by the language


Hi all,

I have a following code in C#:








Application Architecture in Windows Forms 2.0

Applications have special support in Windows Forms. For starters, you can manage and tailor your application's lifetime, and, when the work flow is disrupted by an unhandled exception, you can choose from several methods of response. Then, there are several application models that you can employ, including Single Document Interface (SDI) and Multiple Document Interface (MDI) applications, each of which can support either multiple-instance or single-instance mode, the former the VS05 default and the latter requiring special consideration. All applications, however, can discover and use a wide variety of information about the system and environment they execute in.

Application Architecture in Windows Forms 2.0-Single-MDI Applications

Consider an MDI application like Microsoft Excel; files opened from the file system (by double-clicking) are all opened as separate child windows within the parent Excel window.7 For the first instance of an MDI application to open a new child window to display the file that was passed to the second instance of the application, the second instance must be able to communicate with the initial instance.

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:

Localizing Windows Forms

The Visual Studio project system provides considerable support for localizing Windows Forms applications. There are two ways to generate resource files using the Visual Studio development environment: one is to have the project system generate the resource files for localizable UI elements such as text and images on the form. The resource files are then built into satellite assemblies. The second way is to add a resource file template and then edit the template with the XML Designer. A reason for doing the latter is to make localizable strings that appear in dialog boxes and error messages. You must then write code to access these resources.

This walkthrough topic demonstrates both processes in a single Windows Application project.

You can also convert a text file to a resource file; for more information, see Resources in Text File Format and Resource File Generator (Resgen.exe).


Change Button Text in Multi Language Website


Hi i developing multi language website

using Master pages

everything fine

Page_Load i set the Text property of Button Control from Resource file

like this

Button1.Text = GetLocalResourceObject("Button1")

then in the button click event i cnage the text of the Button control

Button1.Text = GetLocalResourceObject("Button1_new")

but the text doesn't change and no error messgae

what is the problem how to solve this


CLR Inside Out: Extend Windows Forms Apps Using System.AddIn


See how Windows Forms applications can be adapted to use the new .NET Add-in framework (System.AddIn) this month.

Mueez Siddiqui

MSDN Magazine July 2008

GUI Library: Bring the Simplicity of Windows Forms to Native Apps


In this article, author John Torjo presents a guide to his C++ GUI library called eGUI++ and explains how it makes user interface programming easier.

John Torjo

MSDN Magazine June 2008

CLR Inside Out: IronPython and the Dynamic Language Runtime


This column uses the .NET version of the Python programming languages IronPython to demonstrate the value of dynamic languages and the new Dynamic Language Runtime.

Bill Chiles

MSDN Magazine October 2007

Managed Spy: Deliver The Power Of Spy++ To Windows Forms With Our New Tool


Spy++ displays Win32 information such as window classes, styles, and messages. Now you can get that same functionality for managed code using our ManagedSpy. Get it here.

Benjamin Wulfe

MSDN Magazine April 2006

Winning Forms: Practical Tips For Boosting The Performance Of Windows Forms Apps


This article discusses techniques you can use to ensure that Windows Forms-based apps provide optimal performance to match the rich UI responsiveness they're known to provide.

Milena Salman

MSDN Magazine March 2006

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend