Textbox not updating

Unfortunately, it's a different instance from the one you're expecting it to append.

Instead of void, why not have Class1.aupdate() return a string which you append to the textbox in the original instance of Form1? Mr Shoes, on 13 August 2012 - PM, said: Again, you're looking at the textbox in a different instance of Form1.

textbox not updating-54textbox not updating-49

The issue is: The textbox does not update with the String from class b however it displays the string in the Message Box that is called from the form.

Instead of void, why not have Class1.aupdate() return a string which you append to the textbox in the original instance of Form1? I am new to c# and am trying to understand some of the nuances.

I am a python programmer and a php programmer who needs to learn c# for an application that needs to be written. Open Forms to find the form you are interested in, but that is just plain old ugly.

I am trying to bridge the gap from what I know and what I need to learn. If you really need to find the current instance of a form, and there can only ever be one instance of the form, the applying the Singleton design pattern is more appropriate and clues in the reader that there should only ever be one instance of the form.

You worked lessons that had you build simple things first like "Those are my apples. Its just a fraking ridiculous argument to try to take or defend.

There are numerous on-line learning series on the internet that have you learning and WRITING code, not just reading.If you really need to find the current instance of a form, and there can only ever be one instance of the form, the applying the Singleton design pattern is more appropriate and clues in the reader that there should only ever be one instance of the form.You can always make a parameterized constructor for Class1 into which you pass a reference to your current (GUI) instance.I am trying to update a textbox from a class in the same namespace. So I am trying to understand how the Message Box is able to display the value of the sting from class b however the textbox is not updated.The simple sample below firesoff a message box with that proves that class b is sending the information to class a. Again, you're looking at the textbox in a different instance of Form1.This post has been edited by Skydiver: 13 August 2012 - PM You could iterate over the Application.

Tags: , ,