C#C
C#15mo ago
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 like such:
SendMessage(source.Handle, WindowMessage.WM_CHANGEUISTATE, MakeLong((int)UIS.UIS_SET, (int)UISF.UISF_HIDEFOCUS), 0);


where 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
Was this page helpful?