Winforms launcher beginnings.
This commit is contained in:
committed by
Paul Chote
parent
d93c42e89c
commit
439c366ba2
26
OpenRA.Launcher/Util.cs
Normal file
26
OpenRA.Launcher/Util.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenRA.Launcher
|
||||
{
|
||||
static class Util
|
||||
{
|
||||
[DllImport("user32")]
|
||||
public static extern UInt32 SendMessage
|
||||
(IntPtr hWnd, UInt32 msg, UInt32 wParam, UInt32 lParam);
|
||||
|
||||
internal const int BCM_FIRST = 0x1600; //Normal button
|
||||
|
||||
internal const int BCM_SETSHIELD = (BCM_FIRST + 0x000C); //Elevated button
|
||||
|
||||
static public void UacShield(Button b)
|
||||
{
|
||||
b.FlatStyle = FlatStyle.System;
|
||||
SendMessage(b.Handle, BCM_SETSHIELD, 0, 0xFFFFFFFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user