Could you help me with a problem about forms ? I have declared this variable in a module :
Code:
Public GenericForm As System.Windows.Forms.Form
and then through code I can asign to that variable a specific form . For example :
Code:
GenericForm = Form1
Then I can use that variable to handle that specific form , for example :
Code:
GenericForm.Show
My problem begins when I want to handle a control on that form , for example :
Code:
GenericForm.TextBox1.Text = "aaa"
This code creates an error reading : TextBox1 is not a member of System.Windows.Forms.Form .
I have been using code like this in VB6 and was quite useful , but now in VB .NET I cannot . You see I have many forms on which there are some text boxes with the same name , so I declare a generic variable as Form and accordingly insert the code the desired text box conform the form I wish each time . Can I do this in VB .NET too ?