About 14,100,000 results
Open links in new tab
  1. Changing the Label1.Text of Form1 from Form2 Button1_Click in C#

    Jul 8, 2022 · First, we want to expose form1’s Label… label1 control by setting its Modifier property to public. Then when Form1 creates and shows Form2… we want to pass Form1 to …

  2. [RESOLVED] Button Click Form2.Label1.Text = Me.Label1.Text …

    Jan 19, 2009 · There are several ways to do this. The simplest way would be to use the object that you're using as your second form. You may have, at some point, declared a new instance …

  3. VB.NET modify label in form1 from form2 - Stack Overflow

    Dec 14, 2019 · For simplicity let's say I have a Form1 with a label (LBLtest) and a button (BUTtest). Then I have a Form2 with two buttons (BUToption1) and (BUToption2). If I click …

  4. Changing a label's text in another form in C#? - Stack Overflow

    May 22, 2012 · You need to expose your label or its property. In form 2: public string LabelText { get { return this.labelX1.Text; } set { this.labelX1.Text = value; } } Then you can do: form2 frm2 …

  5. Changing label text in Form2 after pressing a button in Form1

    Dec 14, 2016 · How do I change a label text in Form2 after clicking a button in Form1? For example, I want the label text in Form2 to change to "Button 1 was pressed" if I pressed …

  6. How can I update a label on one form from another form in C#?

    Dec 26, 2010 · I want to update label of Form1 from Form2. So here's what I have: // Form1 public string Label1 { get { return this.label1.Text; } set { this.label1.Text = value; } } // Form2 private void

  7. How can I make a label on Form1 say "Hello" from form2?

    Nov 5, 2008 · You have to have a reference to Form1 from Form2. Then you need either a method or a property on Form 1 visible to Form2 that changes the label text to "Hello".

  8. How to Call Label From form2 to Form1 c# - Stack Overflow

    Jul 18, 2016 · public partial class Form2 : Form { public Form2() { InitializeComponent(); } public string Label1Text => label1.Text; } Then: Form f2 = new Form2(); if (textbox.text != …

  9. Changing the label of from2 from within the function of form1

    Feb 7, 2012 · How can I change the label of Form2 from within the Function of Form1? if you could explain the real problem you are trying to solve you might get much better answers. You …

  10. c# - How to make Form1 label.text change when checkbox on form2

    Note you will have to change the Access Modifier in Form1 and make Label1 public so Form2 can alter the Text property. To do this, goto Form1, select Label1 goto Properties, select Modifiers …

Refresh