Multicultural Application : ResourceManager « Development « Visual C++ .NET

Home
Visual C++ .NET
1.2D
2.Class
3.Collections
4.Data Type
5.Database ADO.net
6.Delegate
7.Development
8.File Directory
9.Function
10.Generics
11.GUI Form
12.Language Basics
13.Network
14.Reflection
15.Security
16.Statement
17.Structure
18.Thread
19.XML
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Visual C++ .NET » Development » ResourceManager 
Multicultural Application
 

#include "stdafx.h"

  using namespace System;
  using namespace System::ComponentModel;
  using namespace System::Collections;
  using namespace System::Windows::Forms;
  using namespace System::Data;
  using namespace System::Drawing;
  using namespace System::Globalization;
  using namespace System::Threading;

  public ref class Form1 : public System::Windows::Forms::Form
  {
  public:
    Form1(void)
    {
      Thread::CurrentThread->CurrentCulture = gcnew CultureInfo("fr-fr");
      Thread::CurrentThread->CurrentUICulture = Thread::CurrentThread->CurrentCulture;
      InitializeComponent();
    }

      System::Windows::Forms::Label^  lbHello;
    void InitializeComponent(void)
    {
      System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
      this->lbHello = (gcnew System::Windows::Forms::Label());
      this->SuspendLayout();
      // 
      // lbHello
      // 
      this->lbHello->AccessibleDescription = nullptr;
      this->lbHello->AccessibleName = nullptr;
      resources->ApplyResources(this->lbHello, L"lbHello");
      this->lbHello->BackColor = System::Drawing::SystemColors::Control;
      this->lbHello->Name = L"lbHello";
      // 
      // Form1
      // 
      this->AccessibleDescription = nullptr;
      this->AccessibleName = nullptr;
      resources->ApplyResources(this, L"$this");
      this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
      this->BackgroundImage = nullptr;
      this->Controls->Add(this->lbHello);
      this->Font = nullptr;
      this->Icon = nullptr;
      this->Name = L"Form1";
      this->ResumeLayout(false);

    }
  };

[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
  Application::Run(gcnew Form1());
  return 0;
}

   
  
Related examples in the same category
1.Multicultural Console
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.