Set vb6 form to instance of a hardcoded form -
i have 2 forms. form1 opens form2. form2 after clicking value, sends value textbox located in form1. hardcoded inside form2 explicitly states form1.txtbox.text = "whatever clicked" form2 closes , sitting @ form1, txtbox.text has not received new value form2.
in immediate window form1.txtbox.text = "whatever clicked" alright, txtbox.text = "" within context of form1 blank.
i opened form1 using forms.add("form1") there anyway set instance of form hardcoded instance? imagine error occurring because forms.add("form1") creates instance of form while form1.show actual form. there anyway match these 2 same object?
the best solution using bob77 said , applying form.
when loading form1 using forms.add("form1") method if implement set form1 = me in form_load set reference of me form1 when made direct changes in form2 using form1.foo = "bar" work.
Comments
Post a Comment