Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Getting Accent brush color of a Window 8 machine through Visual C# code
WhatsApp
Selva Ganapathy
10y
8.1
k
0
0
25
Blog
AccentBrushColor.zip
Hope we all might know the from Widows 8, Microsoft provides a feature name Accent Brush that enables us to have our own colors set to Window App (Windows Phone) as well that may provide more elegant UI theme to user expectations. And some of us think that it will be more complex to retrieve the accent color through Visual C# code. But here it come so simple, that we can get the Accent brush color of the through “ uxthem.dll” and the following code snippet may help it with a small demonstration.
[DllImport(
"uxtheme.dll"
, EntryPoint =
"#95"
)]
public
static
extern uint GetImmersiveColorFromColorSetEx(uint dwImmersiveColorSet, uint dwImmersiveColorType, bool bIgnoreHighContrast, uint dwHighContrastCacheMode);
[DllImport(
"uxtheme.dll"
, EntryPoint =
"#96"
)]
public
static
extern uint GetImmersiveColorTypeFromName(IntPtr pName);
[DllImport(
"uxtheme.dll"
, EntryPoint =
"#98"
)]
People also reading
Membership not found