Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a function from one form to another
Message
From
25/07/2005 18:12:53
 
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 1.1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01035826
Message ID:
01035829
Views:
13
David,

I'm a little lost as to what you're trying to do. Which form is called with the .ShowDialog()? Are you aware that showing a form that way doesn't actually close the form and if you have public properties in that Dialog form, you can access them from wherever you called it from ...

I just got lost when you said Form1, current form, second one, etc....

~~Bonnie




>I'm trying to send a variable from one form to another. Form1 is the first form, I open the current form by showdialog(), I then make a selection and want to send that string to a function on the first form and then have the second one close. This approach doesnt seem to be working. I tried bringtofront() but that didnt work either, appreciate the help, TIA!
>
>private void dataGrid1_Click(object sender, System.EventArgs e)
> {
> Form1 form1 = new Form1();
> form1.crystal_report(custno.Trim());
> this.Close();
> }
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform