K
khokimfang
Hi All,
I want to ask how to call form with only one variable in VB.Net.
I have 3 form (Form1, Form2 and Form3) and 1 module.
in the module i want to declare public variable to call form for ex:
Public frm as .....
In the Form1 i have two button (btnForm2 and btn Form3) and one
Function.
Public Function callForm(FormName as String)
frm=..............
frm.show()
frm.txtNameForm.text=FormName
End Function
In the Form2 i have one textbox (txtNameForm)
In the Form3 i have one textbox(txtnameForm)
So, if I click btnForm2 it will "Call callForm("Form2"), Form2 will
displayed and txtnameForm="Form2".
And If I click btnForm3 it will "Call callForm("Form3"), Form3 will
displayed and txtnameForm="Form3".
So can anybody help me how to declare the frm variable so it can call
many form.
Thanks b4
I want to ask how to call form with only one variable in VB.Net.
I have 3 form (Form1, Form2 and Form3) and 1 module.
in the module i want to declare public variable to call form for ex:
Public frm as .....
In the Form1 i have two button (btnForm2 and btn Form3) and one
Function.
Public Function callForm(FormName as String)
frm=..............
frm.show()
frm.txtNameForm.text=FormName
End Function
In the Form2 i have one textbox (txtNameForm)
In the Form3 i have one textbox(txtnameForm)
So, if I click btnForm2 it will "Call callForm("Form2"), Form2 will
displayed and txtnameForm="Form2".
And If I click btnForm3 it will "Call callForm("Form3"), Form3 will
displayed and txtnameForm="Form3".
So can anybody help me how to declare the frm variable so it can call
many form.
Thanks b4