Solved

Vb.Net - TabControl Hide Tab

Posted on 2013-05-28
4
526 Views
Last Modified: 2013-05-29
Good Day Experts!

I have searched online but I am not quite sure how to go about this new task.  My application is centered around a Form that has a tabControl on it.  Currently there are 19 tabs on it.  The 20th Tab I added is the one causing the trouble.  I want to hide it for all but 3 Users.  So, in the Form_Load I am checking for Username but I cannot seem to get the syntax down for how to hide the tab.  Also, I am not sure what is going to happen when I have to add a tab for all Users to see right after the one I am hiding based on User.

What do you think?

Thanks,
jimbo99999
0
Comment
Question by:Jimbo99999
  • 2
4 Comments
 
LVL 4

Expert Comment

by:frankd
ID: 39202138
I usually check for proper user on enter and go to another tab if that user isn't allowed.  Something like;
If User not allowed then
     TabControl1.SelectedTab = TabPage7    ' some other tab page
end if

I may be wrong, but I don't think you can hide a tab.
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 39204122
0
 

Author Comment

by:Jimbo99999
ID: 39204468
Excellent...thanks I will try this morning.
0
 

Author Closing Comment

by:Jimbo99999
ID: 39205191
Thanks, it is working now.

Appreciate the help,
jimbo99999
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
As soon as i click a button on the form,it mnimises. 11 30
Changing the Source of an ADO Recordset while it's open 4 37
Format column on datatable 7 29
Open a word document 23 33
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now