Let's suppose I have form1. This form shows form2 by:Now form2 is showed and performs its task returning an object and I want to return this object to form1. How I can do?VB Code:
dim f2 as new form2 f2.showdialog()
thx
Xmas.
Printable View
Let's suppose I have form1. This form shows form2 by:Now form2 is showed and performs its task returning an object and I want to return this object to form1. How I can do?VB Code:
dim f2 as new form2 f2.showdialog()
thx
Xmas.
forms usually arenot intended to return values or objects to their callers. you might consider other means in vb.net like classes or modules. however if you want to do it with a form, one way is to define a shared field in your first form (form1) and from form2 do whatever it senses. be aware that a shared field is associated to a type not to an instance.
aaah cool Edneeis! I was always doing these through delegates...:DQuote:
gotto take a look at that shadows keyword