473,395 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Reloading MDI Container ?

Hi,

Say a form, a MDI Container, called frmMain; another form frmLanguage
allowing me to change the User Interface Language. Changing the
language works fine when I quit the application and comes back. I would
like to make that more user friendly.

The code in frmLanguage where I am changing the Language.
Select Case Me.chkLanguage.SelectedIndex
Case 0
GlobalValue.SetLanguage = "fr"
Case 1
GlobalValue.SetLanguage = "de"
Case 2
GlobalValue.SetLanguage = "en"
End Select
'SaveSetting("CCBase", "Language", "User",
GlobalValue.SetLanguage)
Dim regVersion As RegistryKey
regVersion =
Registry.CurrentUser.OpenSubKey("Software\\Corobor i\\EsabCC", True)
If regVersion Is Nothing Then
' Key doesn't exist; create it.
regVersion =
Registry.CurrentUser.CreateSubKey("Software\\Corob ori\\EsabCC")
End If
If (Not regVersion Is Nothing) Then
regVersion.SetValue("Language",
GlobalValue.SetLanguage)
regVersion.Close()
End If
Dim frm As Object
frm = Me.Owner
If frm.name = "frmMain" Then
frm.Recharger() ' <------------
End If
The code in frmMain to reload the MDI Container. It doesn't work, after
running this the application isn't working anymore

Function Recharger()
Const sFName As String = "Recharger"
Try
Thread.CurrentThread.CurrentUICulture = New
CultureInfo(GlobalValue.SetLanguage)
InitializeComponent()
Catch ex As Exception
MessageBox.Show(sFName + ": " + ex.Message, Me.Text,
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Function
Any clue how I should to this ?

Jean-Luc
www.corobori.com

Nov 21 '05 #1
1 1308
Corobori,

I strongly advice you to use the language from the globalization (system
settings). A sample quick and dirty

\\\
Dim Language As InputLanguage = InputLanguage.DefaultInputLanguage
Dim currentlanguage as string =
Language.CurrentInputLanguage.Culture.Name.Substri ng(0, 2))
///

I don't read from registry as you do. However I see that you use in the
strings the C type notation with double slash. I use in VBNet single
slashes. Therefore try that first because I don't know if the method I use
is using a bug.

I hope this helps,

Cor
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Greg Bryant | last post by:
Wondering why my setcookies didn't have any impact, I noticed the line in the manual that said the page needs to be reloaded before they take effect (which does make a certain kind of sense). So,...
3
by: jbj | last post by:
Something like a php function that can be called? I have php in a page that needs to be update periodically (basically poll results) without reloading the page around it (I do have a button you...
4
by: J. J. Cale | last post by:
Hi Obviously I'm new to PHP. I would like to be able to update a table in a page from a database on the server without reloading the page each time. Is this possible with PHP? TIA Jimbo
2
by: Andy Jewell | last post by:
Does anyone know of a way to dynamically reload all the imported modules of a client module? I'm writing a program that I have broken down into quite a few submodules, and the 'configuration'...
2
by: aurora | last post by:
I am looking for a way for reloading updated modules in a long running server. I'm not too concerned about cascaded reload or objects already created. Just need to reload module xxx if the...
8
by: Aspersion | last post by:
I'm building an ASP page that has a lot of text and graphics. There is a calculation facility on the page. The user enters several numbers in a form and presses a button to see the calculated...
2
by: Snolly | last post by:
Hi all, Here is my issue. I have a web page (lets call it page1) with an iframe in it that then opens a pop-up window (page2). The pop-up window is used to edit some data that was loaded into...
3
by: Richard | last post by:
Hey there, I have a textbox and a listbox. When a user types a number in the textbox, I want to get all the records from a MS Access DB but without reloading the page. I now have something...
9
by: andrewfelch | last post by:
Hello all, I'm using the metaclass trick for automatic reloading of class member functions, found at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 My problem is that if I 1)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.