© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•17mo ago•
3 replies
nullptr

✅ remove dotted border around win32 control in wpf?

hello all! im hosting a win32 control (command links) in wpf but on click they have a dotted border. im trying to replicate windows 7's wizards (which didn't have this on click) so i was wondering how i can remove the border? i've seen people suggest
WM_CHANGEUISTATE
WM_CHANGEUISTATE
like such:
SendMessage(source.Handle, WindowMessage.WM_CHANGEUISTATE, MakeLong((int)UIS.UIS_SET, (int)UISF.UISF_HIDEFOCUS), 0);
SendMessage(source.Handle, WindowMessage.WM_CHANGEUISTATE, MakeLong((int)UIS.UIS_SET, (int)UISF.UISF_HIDEFOCUS), 0);


where
source.Handle
source.Handle
is the main window's handle. however, this doesn't remove the dotted border (but it does remove all focus-related visuals from my wpf elements)
Exwhgv.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

WPF Border around transparent image
C#CC# / help
4y ago
❔ WPF+Win32 interop issue
C#CC# / help
3y ago
❔ WPF Border Button
C#CC# / help
3y ago