We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I call a function in Form1 from Form2

Thread ID:

Created:

Updated:

Platform:

Replies:

1981 Dec 9,2002 11:24 AM UTC Dec 10,2002 11:17 AM UTC Windows Forms 2
loading
Tags: FAQ
Pater
Asked On December 9, 2002 11:24 AM UTC

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?

Administrator [Syncfusion]
Replied On 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? > >

Peter
Replied On December 10, 2002 11:17 AM UTC

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;