Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a function from one form to another
Message
De
25/07/2005 18:12:53
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 1.1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01035826
Message ID:
01035829
Vues:
12
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform