Solved

Vb.Net - TabControl Hide Tab

Posted on 2013-05-28
4
540 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 70

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual studio 2015 1 43
Vb.net progressbar with timer1 in visual studio win app 11 49
reading an excel file vb.net 2 43
How to embed a manual into my vb 2005 project 7 23
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

738 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