HI all,
New to vb.net
I need to know how to talk to a calling form from a called form. I want to
change various properties of the form as well as properties of objects on
that form, Ie pushbuttons texts, label texts etx. I also need to be able to
call som of the objects on the calling forms events, eg to be able to call a
pushbuttons click event on the calling form.
The calling form is not a mdiparent, the called form is not a mdi client,
they are just two seperate forms
form1 opens
pushbutton on form2 creats a object reference to form2
opens form2
on form2 a pushbutton changes text on a label on form one
and then callus a pushbutton click event on form1
In visual dbase I wouild do it like this
'''form1''
set procedure to form2.wfm addi 'load the form in memory
form.ochildform = new form2() 'create a new object in this form
referencing the new form
form.ochildform.parent = form 'reference this form from the other form
pushbutton onclick()
form.ochildform.open() 'open the new form
'''form2''
form.parent.label1.text = "text has changed" 'cjhange the text on the
label of form1
form.parent.pushbutton_onclick() 'call the click event of pushbutton on
form1
Thanks
Robert