Click here to Skip to main content
15,887,950 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How can I draw a line in designer? Pin
TwoFaced7-Mar-07 23:29
TwoFaced7-Mar-07 23:29 
GeneralRe: How can I draw a line in designer? Pin
NanaAM8-Mar-07 1:37
NanaAM8-Mar-07 1:37 
QuestionMenu bars based on users............. Pin
Member 38798817-Mar-07 22:11
Member 38798817-Mar-07 22:11 
AnswerRe: Menu bars based on users............. Pin
haggenx8-Mar-07 8:25
haggenx8-Mar-07 8:25 
GeneralRe: Menu bars based on users............. Pin
Member 38798818-Mar-07 17:13
Member 38798818-Mar-07 17:13 
AnswerRe: Menu bars based on users............. Pin
Jelle Stokroos8-Mar-07 10:15
Jelle Stokroos8-Mar-07 10:15 
GeneralRe: Menu bars based on users............. Pin
Member 38798818-Mar-07 17:07
Member 38798818-Mar-07 17:07 
AnswerRe: Menu bars based on users............. Pin
Jelle Stokroos9-Mar-07 5:59
Jelle Stokroos9-Mar-07 5:59 
So VB.NET it is.

I do not understand the rest of your comments.

I would build the menu's in full form and not enable the items that an UserGroup can not use or hid the menu item altogether if that is preferred. For doing so:

You can decorate you menu creation with;

'Get a WindowsIdentity object for the current user. NameSpace: System.Security.Principal<br />
Dim currentIdentity as WindowsIdentity = WindowsIdentity.GetCurrent()<br />
'The WindowsPrincipal class can give access to the user's group memberships<br />
Dim currentPrincipal as WindowsPrincipal = New WindowsPrincipal(currentIdentity)


And use the following to test if menu items should be "not enabled" or "hidden".

if currentPrincipal.IsInRole("DOMAIN/Group Name") Then ' substitute DOMAIN and Group Name<br />
	'Do your menu item setting<br />
End if


Clean up you objects. IsInRole can to with a Try block.

I hope it is something like this you are after. Else I possibly can do with some code.


Jelle
GeneralRe: Menu bars based on users............. Pin
haggenx9-Mar-07 7:31
haggenx9-Mar-07 7:31 
QuestionDatabinding Issue Pin
Neily There7-Mar-07 22:09
Neily There7-Mar-07 22:09 
QuestionColin Angus Mackay thanks for the cite Pin
Adekolurejo7-Mar-07 22:01
Adekolurejo7-Mar-07 22:01 
AnswerRe: Colin Angus Mackay thanks for the cite Pin
Colin Angus Mackay7-Mar-07 22:13
Colin Angus Mackay7-Mar-07 22:13 
Questionhow to attach falsh in vb.net??? Pin
bhawna_k7-Mar-07 20:43
bhawna_k7-Mar-07 20:43 
QuestionBindingcontext child_to_parent Pin
epkjoha7-Mar-07 20:35
epkjoha7-Mar-07 20:35 
QuestionHow do I change the background color of a command button Pin
ArchaBhandare7-Mar-07 19:43
ArchaBhandare7-Mar-07 19:43 
QuestionConnection String to the database. Pin
thesemplice7-Mar-07 19:05
thesemplice7-Mar-07 19:05 
AnswerRe: Connection String to the database. Pin
thesemplice7-Mar-07 19:06
thesemplice7-Mar-07 19:06 
AnswerRe: Connection String to the database. Pin
Colin Angus Mackay7-Mar-07 22:12
Colin Angus Mackay7-Mar-07 22:12 
AnswerRe: Connection String to the database. Pin
Dave Kreskowiak8-Mar-07 2:56
mveDave Kreskowiak8-Mar-07 2:56 
GeneralRe: Connection String to the database. Pin
thesemplice8-Mar-07 18:25
thesemplice8-Mar-07 18:25 
Questionretrieving time and date from system. Pin
manni_n7-Mar-07 19:02
manni_n7-Mar-07 19:02 
AnswerRe: retrieving time and date from system. Pin
The ANZAC7-Mar-07 22:46
The ANZAC7-Mar-07 22:46 
GeneralRe: retrieving time and date from system. Pin
manni_n8-Mar-07 2:17
manni_n8-Mar-07 2:17 
Questionshrinking and expanding Pin
balakpn7-Mar-07 17:48
balakpn7-Mar-07 17:48 
AnswerRe: shrinking and expanding Pin
TwoFaced7-Mar-07 17:52
TwoFaced7-Mar-07 17:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.