.net - reference on control
Posted on 2002-05-18
I am writing test vb.net app and I cannot solve this problem:
Let say I have two independent forms Form1 and Form2. On Form1 is textbox1 and on Form2 is button1.
Button_click code should be (like in VB6): form1.textbox1.text = »test«
But obviously in .net things are more restrictive. Can anyone tell me, how to solve this?
I already write this app in vb6 and then upgrade it to .net. Upgraded project works fine with upgrade code added »Public Shared Property DefInstance()«.
I believe this in not the way to write new apps (always and on every form add this property) in .net and I am looking for right way to do this.
Thanks for help!