Please help me with this little problem.
I am developing a small VB.NET project which has several forms.
Each form has a private sub similar to the one shown below:
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
If TabControl1.SelectedTab Is TabPage1 Then
If Estado1 = True Then
Estado1 = False
ElseIf TabControl1.SelectedTab Is TabPage2 Then
If Estado2 = True Then
Estado2 = False
ElseIf TabControl1.SelectedTab Is TabPage3 Then
If Estado3 = True Then
Estado3 = False
ElseIf TabControl1.SelectedTab Is tabpage_N Then
I have the following codes inside a module:
Public Sub Cargador(ByVal MyForm1 As Form)
As you can see, the Cargador subroutine is being called frequently from every
form. I know that I cannot call the Cargador sub with a simple 'Cargador (Me)'.
I still need to pass other argumments for the 'TabControl1.SelectedTab'.
The problem is that I don't know how to reference
the Cargador's sub declaration.
The compiler highlights the 'TabControl' in the CtlPlc ReDim statement and gives me an error that says:
TabControl1 is not a member of system.windows.forms.form
I am new to programming. Any help will be appreciated.
Thanks in advance.