How do I call a function in Form1 from Form2

I have Form1 and Publick Function X() that loads data into a combo box in that form. In my Form2 when I add a new customer how do I call Function X()in Form1 so it will execute and effect the data in Form1. I tried in Form2 on Button Click event: Dim Form1 as new Form1 Form1.X() 'but didn't work. What else I can try?

2 Replies

AD Administrator Syncfusion Team December 9, 2002 06:54 PM UTC

If this is an mdi then the form2 can case (Form1)this.mdiparent or if this is an sdi then I try this.parent > I have Form1 and Publick Function X() that loads data into a combo box in that form. > > In my Form2 when I add a new customer how do I call Function X()in Form1 so it will execute and effect the data in Form1. > > > I tried in Form2 on Button Click event: > Dim Form1 as new Form1 > Form1.X() > 'but didn't work. What else I can try? > >


PE Peter December 10, 2002 11:17 AM UTC

Thank you for your replay. Please if you can specify in VB instead of C#.

Loader.
Up arrow icon