Tab Control

  • Thread starter Thread starter Steven Smith
  • Start date Start date
* "Steven Smith said:
I tried that cor it doesn't seen to like that either
returning 'Value of type integer cannot be convereted to
System.Windows.Form.TabPage' this must be something to do
with the interaction between the 2 forms (parent and
child) as when using me.tabcontrol.selectedindex it
returns no errror

The tabcontrol's 'SelectedIndex' property expects an integer (the number
of the tab), the 'SelectedTab' property expects a reference to a
'TabPage' instance.
 
* "Steven Smith said:
so when I click an item in the parents main menu I
trigger:

\\\
Handles MenuItem42.Click

Call Merge_menu()

Dim objMaintainElevatorStatusForm As New
frmMaintenanceElevatorStatus

objMaintainElevatorStatusForm.MdiParent = Me

objMaintainElevatorStatusForm.Show()

End Sub
///

so just before the .show() statement I need to have
something along the lines of

\\\
objMaintainElevatorStatusForm.tabcontrol1.selectedindex =
x
///


however it does not like = x or any other other integer
or variable name

Where/how did you declare 'x'?
 
I thought that perhaps when the tab pages in a tab
control were created they were automatically added to
some kind of collection in the windows generated code I
thought that 'x' in this case would have simply been the
index to access each of these elements in this collections

not to worry the problem is now solved, thanks to all for
your help and advice
 
Back
Top