![]() ![]() Private Const BCM_SETSHIELD As Int32 = (BCM_FIRST + &HC) Private Const BCM_FIRST As Int32 = &H1600 Private Declare Ansi Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As String) As Integer StartInfo.FileName = Application.ExecutablePathĭim p As Process = Process.Start(startInfo)Ĭatch ex As 32Exception ![]() StartInfo.WorkingDirectory = Environment.CurrentDirectory SendMessage(b.Handle, BCM_SETSHIELD, 0, &HFFFFFFFFUI) Return p.IsInRole(WindowsBuiltInRole.Administrator)įriend Shared Sub AddShieldToButton(b As Button) Return < 6įriend Shared Function IsAdmin() As Booleanĭim id As WindowsIdentity = WindowsIdentity.GetCurrent() Public Shared Function SendMessage(hWnd As IntPtr, msg As UInt32, wParam As UInt32, lParam As UInt32) As UInt32įriend Const BCM_FIRST As Integer = &H1600įriend Const BCM_SETSHIELD As Integer = (BCM_FIRST + &HC)įriend Shared Function IsVistaOrHigher() As Boolean ![]() Hi everything works perfect but i cant get the uac icon to my button. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |