Move a control on a tab panel

I have a tab panel with multiple tabs and there are a couple of tabs that have several common elements displayed ( Employee Name, Employee Number ) and I don’t want to create an instance for each tab but simply use one instance and when a new tab is selected if the elements are required then move them from where they are to the new tabpanel.

What you’re looking for is PanelIndex

Select Case Me.SelectedPanelIndex
Case 0
  txtEmployeeName.PanelIndex = 0
Case 1
  txtEmployeeName.PanelIndex = 1
Case 2
Case 3
Case 4
Case 5
  'MessageBox( Me.SelectedPanelIndex.ToText )
Case 6
Case 7
Case 8
End Select

I tried this and it doesn’t work.

If it applies to all tabs, you could unparent the text field so that it’s secretly just floating above the tab panel. This may cause drawing issues on Windows though.

I program only for Linux systems… much easier. But I think I know what you mean. Just set the top and left values when needed then make it Visible = False.

This is a classic use of ControlSet. Put a control on which ever panels need them and they all share the same code.