0

button code change Form1 (mp)

private void bunifuThinButton21_Click(object sender, EventArgs e)
        {
            sx mp = new sx();
            mp.textBox1.Text = "";
            mp sx = new mp();
            sx.Hide();
        }

button code change Form2 (sx)

private void button10_Click(object sender, EventArgs e)
        {
            if(textBox1.Text == "")
            {
                mp sx = new mp();
                sx.Show();
                textBox1.Text = "1";
            }
        }

It's all code, if It's not with details, i can post another post xd

sticky bit
  • 36,626
  • 12
  • 31
  • 42
  • Does this answer your question? [How to clear textbox from another form in C#?](https://stackoverflow.com/questions/62463981/how-to-clear-textbox-from-another-form-in-c) –  Jul 06 '20 at 10:38
  • @OlivierRogier no, i want to change TEXT in text box from another form in c# – White Foox Jul 10 '20 at 19:53
  • You can assign something instead of clearing. There is tons of same question on Stack Overflow that ask how to access a control of a form from another form, and tons of answers... The two main method are to use a static reference (singleton) or a registration (callback). I put the first found, sorry. Here some others: https://stackoverflow.com/search?q=c%23+access+a+control+of+a+form+from+a+another+form. But perhaps I did not understand the question. I hope this can help you to enjoy coding: [How do I improve my knowledge in C#](http://www.ordisoftware.com/files/stack-overflow/CsharpBegin.htm) –  Jul 10 '20 at 19:55

0 Answers0