Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing values between forms
Message
De
16/03/2003 14:59:30
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00766332
Message ID:
00766368
Vues:
19
The sub New() in your form, should include a parameter (sorry, I don't remember what the VB syntax is) then you call your form with
Dim frm As New frm_Payment(MyParameter)
>Bonnie, sorry but still I didn't get it..
>
>here is what I don to open the form when I click a botton
>
>Dim frm As New frm_Payment()
>frm.Show()
>
>where you statment fits?
>
>
>>Ahmad,
>>
>>Is this VB or C#? In VB, the "constructor" is the sub New().
>>
>>~~Bonnie
>>
>>
>>>Hi Bonnie, How are you ?
>>>
>>>Where should I place the constructor statment ?
>>>
>>>
>>>>Ahmad,
>>>>
>>>>I assume that you're talking about WinForms, correct? I think the best way is to use parameters, which you put in the constructor of your form.
>>>>
>>>>// Your form's constructor:
>>>>public MyForm(int MyParm1, string MyParm2)
>>>>{
>>>>}
>>>>
>>>>// Calling the form:
>>>>MyForm oForm = new MyForm(MyIntParm, MyStringParm);
>>>>oForm.Show();
>>>>
>>>>
>>>>~~Bonnie
>>>>
>>>>
>>>>>Dear All,
>>>>>
>>>>>What is the best way to pass variable(s) from form to another?
>>>>>Is it making the variable as public, or there is a better way ?
>>>>>
>>>>>Thanks for the advice
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform