ITPub博客

首页 > 数字化转型 > ERP > 判断当前用户是否为系统管理员的实例

判断当前用户是否为系统管理员的实例

原创 ERP 作者:tolyhuang 时间:2009-02-05 10:12:13 0 删除 编辑

[@more@]

Option Explicit
Private Declare Function IsUserAnAdmin Lib "shell32" () As Long
   

Private Sub Form_Load()

   Command1.Caption = "IsUserAnAdmin"
   Label1.Caption = ""
   
End Sub

   
Private Sub Command1_Click()
  
   Select Case IsUserAnAdmin()
      Case 1:
         Label1.Caption = "YES"
         
      Case False:
         Label1.Caption = "NO"
   End Select

End Sub

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9437124/viewspace-1016753/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-07-22

  • 博文量
    268
  • 访问量
    1468745