public ApplyResources ( object value, string objectName ) : void | ||
value | object | |
objectName | string | |
return | void |
ComponentResourceManager resources = new ComponentResourceManager(typeof(Form1)); resources.ApplyResources(this.button1, "button1"); resources.ApplyResources(this.label1, "label1");
ComponentResourceManager resources = new ComponentResourceManager(typeof(UserControl1)); resources.ApplyResources(this.button1, "button1"); resources.ApplyResources(this.label1, "label1");In this example, we create a new ComponentResourceManager object and pass the type of the user control we want to apply resources to. We then apply the resources to the user control's button and label controls using their names. Package library: System.Windows.Forms.dll
public ApplyResources ( object value, string objectName ) : void | ||
value | object | |
objectName | string | |
return | void |