localization - Access form ressources from code in VS 2015 (VB.NET) -


good morning,

context: have localized vb.net form, called menu.vb localization activated, have multiple ressource files attached, menu.resx, menu.fr-fr.resx...

i have added custom string ressources files, , display string in msgbox, depending on culture selected.

problem: can't access form ressource within form code.

could please me this?

thanks lot, maxime

use system.componentmodel.componentresourcemanager access form resources:

// inside form code - 'this' represents form instance dim resources componentresourcemanager = new componentresourcemanager(this.gettype())  // string want resources.getstring("nameofthestringresource")  // optionally can access same specific culture resources.getstring("nameofthestringresource", new cultureinfo("en-us")) 

Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -