well maybe this is an easier to understand example :-)
Dim ident As System.Security.Principal.WindowsIdentity =
System.Security.Principal.WindowsIdentity.GetCurre nt()
Dim user As New System.Security.Principal.WindowsPrincipal(ident)
If Not (user.IsInRole(Security.Principal.WindowsBuiltInRo le.Administrator))
Then
Me.Visible = False
MsgBox("Settings form only availlable for Administrators ! ",
MsgBoxStyle.DefaultButton3)
Me.Close()
End If
Michel Posseth [MCP]
"Jack Russell" <ja***@norubbish.tpg.com.au> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Cor Ligthert wrote: "Jack Russell"
Is there an easy way to tell if the current user is an administrator?
http://msdn.microsoft.com/library/de...nroletopic.asp
I hope this helps,
Cor
thanks, I think it does but life would be much easier if someone at MS
spoke English!