Accessing other forms

This is a discussion on Accessing other forms within the C# Programming forums, part of the General Programming Boards category; How can I, from form1's code, access form2, to for example change the title of form2 etc? I type in ...

Accessing other forms

How can I, from form1's code, access form2, to for example change the title of form2 etc? I type in "form2.", and the options it brings up having nothing to do with changing the properties of form2. Please help! (I'm using C# 2005 express).

you can create a public function in form2 to do whatever you want so you can call it and send it whatever, like if you have a label in form 2 you could create a public SetLabel(string) function in form 2 and then call it from form 1 by calling