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
Post a Comment