Hi,

I my application I want to hide certain menu options depending on the user that uses the application. My idea was to create a database with all the users and their specific rights and then check in the application which user is current.

Retracing the user can be done by:

Dim UserIdentity As WindowsIdentity = WindowsIdentity.GetCurrent

but this gives the username and the name of the machine he is working on (ex: tb/PC001). I just need the part before the /. Is there a way to get this or do I have to write a function to decompose the returned string?

Can somebody give me a help with this function because I don't know how to code this.

thanx,

Tom