Possible Duplicate:
Using and instance of a class on two forms
As I am pretty new to OOP – especially with Visual C# – I have a problem understanding the following:
A Windows Forms application has several forms. They all shall have access to a object Client (for communicating with a server) created in one of the forms. But how do I make exactly this object instance available in the other forms?
You can make the Client public static in the form parent form and access it from other forms. You have to make it thread safe if access synchronously.
Public will make it available to other forms where as make a single instance for all forms. To make it public static.
To access it from other forms, assuming client is in Form1 and being accessed from other form.