Chaning Regional Setting via Vb.net

strider

Well-known member
Joined
Sep 20, 2004
Messages
52
Location
Dublin, Ireland
Programming Experience
1-3
hey guys,
does anyone know how to change the regional settings of the device via code?
i think its a registry key but unsure as to which one

any help appreciated!!!

Cheers

Barry
 
I'm not sure i understand the question but in order to change say input language you can use something very simple

VB.NET:
'this will change keyboard layout to second installed language on your machine
System.Windows.Forms.InputLanguage.CurrentInputLanguage = InputLanguage.InstalledInputLanguages(1) 'you change only the index of installed languages

Also, this could be achieved with LoadKeyboardLayout API function.


Regards ;)

 
I used opennetcfs Registry Editing Library and this is how i done it

'IRISH SETTINGS
Try
Dim registryKey As RegistryKey = Registry.LocalMachine.OpenSubKey("nls", True)
System.UInt32))
registryKey.SetValue("DefaultLCID", CType(System.Convert.ToUInt32(6153), System.UInt32))

registryKey.Close()
registryKey = Registry.LocalMachine.OpenSubKey("nls\overrides", True)
registryKey.SetValue("LCID", CType(System.Convert.ToUInt32(6153), System.UInt32))
registryKey.Close()
'Reboot()
Catch ex As Exception
MsgBox(ex.Message)
End Try
 
Back
Top