Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return a value
Message
De
30/11/2004 11:18:48
Del Despain
Colorado Plateau Associates
Hurricane, Utah, États-Unis
 
 
À
30/11/2004 11:04:34
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Divers
Thread ID:
00965710
Message ID:
00965736
Vues:
12
>make a property on Form2

That's the way I've been doing it - glad to know I'm not totally out to lunch. Thanks!

Del



>Del,
>
>>... no need to pass anything back. This may not be best practice programming, however.<
>
>Oh, it's ok to do that. What wouldn't be kosher would be to make the TextBox public and access frmnumpad.MyTextBox.Text from the calling form. Best practice is to make a property on Form2 and access this property from the calling form.
>
>~~Bonnie
>
>
>
>
>>frmnumpad will still be in scope after the dialog is closed, so you can still access anything on the form from within the method that calls the dialog (after line frmnumpad.ShowDialog()) - no need to pass anything back. This may not be best practice programming, however.
>>
>>Del
>>
>>>I know this is easy, but I can't seem to get it right so.....
>>>
>>>I have a form that calls a second form.
>>>
>>>testx = "help";
>>>Form2 frmnumpad = new Form2(testx);
>>>frmnumpad.ShowDialog();
>>>MessageBox.Show(testx);
>>>
>>>this does fine. The value in variable "testx" is passed to the new form and it shows up there without a problem. I want to enter some data into a textbox on the new form, then return that entry into "testx" and see it back on the calling form.
>>>
>>>I know how to do this in VFP easy enough, but seem to be having a brain lock on this one.
>>>
>>>Any help would be appreciated.
>>>
>>>thanks
>>>
>>>Alan Wyne
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform