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