Hello,
Consider a WinForm A and a WinForm B. I want to click a button from B and write something in a textBox from A. Can you help me with that?
Thanks
Hello,
Consider a WinForm A and a WinForm B. I want to click a button from B and write something in a textBox from A. Can you help me with that?
Thanks
It's like this, i got my main form..FormA..i push a button and create a FormB (FormB x =new FormB(); x.ShowDialog(); ) now i want to push a button from x and write something in a textbox from my main form..there is no instance of FormA
In FormA, try writing a method like this in Form A:
Then, in Form B, try this:Code:public static WriteText(string TheText) { textBox1.Text = TheText; }
I dunno if it works or not? The "static" keyword should do the trick.Code:FormA.WriteText("Hello world");
thanks for your reply Xav i will see try and let you know about the results
In this context:
public static WriteText(string TheText)
{
textBox1.Text = TheText;
}
textBox1 seems not be visible
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks