?
Solved

Vb.Net - TabControl Hide Tab

Posted on 2013-05-28
4
Medium Priority
?
550 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

800 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