Click to See Complete Forum and Search --> : Passing parameters to parent form
Xmas79
Dec 30th, 2002, 05:53 PM
Let's suppose I have form1. This form shows form2 by:dim f2 as new form2
f2.showdialog()Now form2 is showed and performs its task returning an object and I want to return this object to form1. How I can do?
thx
Xmas.
Edneeis
Dec 30th, 2002, 06:02 PM
http://www.vbforums.com/showthread.php?s=&threadid=222046
burbakei
Dec 30th, 2002, 06:12 PM
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.
MrPolite
Dec 31st, 2002, 01:18 PM
Originally posted by Edneeis
http://www.vbforums.com/showthread.php?s=&threadid=222046 aaah cool Edneeis! I was always doing these through delegates...:D
gotto take a look at that shadows keyword
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.