TabControl - Hidden Headers | Structure your Form 08-14-2013, 04:40 PM
#1
TabControl - Hide Headers
Hello guys and thank you for checking out this very quick tutorial.
Here you can learn how to hide the Headers in a TabControl.
This is very useful if you create a Builder for a RAT for example, and you like to structure the Settings over multiple pages.
The user don't have to click the little TabControl-Header, you can switch the TabPages easiely by a way you like to (Buttons, ListBox etc).
Lets get started.
1) Create a new Windows Forms Application.
2) Drag a TabControl on you form and add as many pages as you like. In this tutorial I use 3.
When you are done it should look like this:
![[Image: fpmoeg6v.png]](http://s14.directupload.net/images/130814/fpmoeg6v.png)
3) As you can see, the normal TabControl has those TabHeaders to switch between you pages.
Now give every TabPage a different color or add some controls so we can later see the TabSwitch
If you are done, it should look similar to this:
![[Image: 1376489086656.gif]](http://m.UploadEdit.com/b019/1376489086656.gif)
4)Now for the Coding Part. Doubleclick your form to get in the form load event.
There you paste this code:
![[Image: 3s8ak5xd.png]](http://s7.directupload.net/images/130814/3s8ak5xd.png)
This will hide the TabControlheaders at runtime, but still show them in the IDE for easy editing/designing.
5) Now we can think how we like to show every TabPage. You can use ListBox Items, TreeView nodes etc. But in this simple tutorial I am going to use Buttons.
So add 3 Buttons below our TabControl
6) In the buttons, just paste this code:
![[Image: svn4beij.png]](http://s14.directupload.net/images/130814/svn4beij.png)
The TabIndex starts at 0, so the first TabPage has Index 0, The second TabPage has 1 and the Third TabPage has 2.
7) You are done. It should now look like this:
![[Image: yeljtvot.gif]](http://s7.directupload.net/images/130814/yeljtvot.gif)
As you can see the TabHeaders are hidden.
I hope you liked this very small tutorial
Here you can learn how to hide the Headers in a TabControl.
This is very useful if you create a Builder for a RAT for example, and you like to structure the Settings over multiple pages.
The user don't have to click the little TabControl-Header, you can switch the TabPages easiely by a way you like to (Buttons, ListBox etc).
Lets get started.
1) Create a new Windows Forms Application.
2) Drag a TabControl on you form and add as many pages as you like. In this tutorial I use 3.
When you are done it should look like this:
![[Image: fpmoeg6v.png]](http://s14.directupload.net/images/130814/fpmoeg6v.png)
3) As you can see, the normal TabControl has those TabHeaders to switch between you pages.
Now give every TabPage a different color or add some controls so we can later see the TabSwitch

If you are done, it should look similar to this:
![[Image: 1376489086656.gif]](http://m.UploadEdit.com/b019/1376489086656.gif)
4)Now for the Coding Part. Doubleclick your form to get in the form load event.
There you paste this code:
![[Image: 3s8ak5xd.png]](http://s7.directupload.net/images/130814/3s8ak5xd.png)
This will hide the TabControlheaders at runtime, but still show them in the IDE for easy editing/designing.
5) Now we can think how we like to show every TabPage. You can use ListBox Items, TreeView nodes etc. But in this simple tutorial I am going to use Buttons.
So add 3 Buttons below our TabControl
6) In the buttons, just paste this code:
![[Image: svn4beij.png]](http://s14.directupload.net/images/130814/svn4beij.png)
The TabIndex starts at 0, so the first TabPage has Index 0, The second TabPage has 1 and the Third TabPage has 2.
7) You are done. It should now look like this:
![[Image: yeljtvot.gif]](http://s7.directupload.net/images/130814/yeljtvot.gif)
As you can see the TabHeaders are hidden.
I hope you liked this very small tutorial

by Madara-Uchiha
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)

![[Image: w2bzKQY.png?1]](http://i.imgur.com/w2bzKQY.png?1)





![[Image: CDUAq9d.png]](http://i.imgur.com/CDUAq9d.png)

![[Image: tumblr_m4vms28lYu1qj3ir1.gif]](http://media.tumblr.com/tumblr_m4vms28lYu1qj3ir1.gif)

![[Image: hObYm.gif]](http://i.imgur.com/hObYm.gif)