call method from one form to another

  • Thread starter Thread starter Ignacio Martinez
  • Start date Start date
I

Ignacio Martinez

Hey group!
I'm kinda new on windows app development, and I'm playing around with
vb.net.

I have a small VB.NET app on wich I have a Browse Form wich calls, on
demand, an "insert data" form.

this last form has some input fields, and then an OK button.
the thing is that I want to refresh the Browse Form with the new data
(there's a Sub Procedure that does this) once I pushed the OK button on the
insert form.

the browse form is not MDI Container, the main menu one is.
but I cannot find the way to make it parent form for the second one, so I
can call methods from that or any other form.

(I hope my english is clear enough)

any ideas?
thanx a bunch

Ignacio.
 
You can use MDIParent to reference properties/methods in the parent form,
but in general, if you create a class or module and declare your method as
Shared in a class, Public in a module, you can call that method from
anywhere.

HTH,

Bill
 
hi Ignacio,

You can also raise an event from the child form i.e.
insert data on "OK" button click, which is subscribed in
your parent form and pass the data in the eventargs object.
 
Back
Top