C
C#4mo ago
João Paulo

Windows Forms

When I create a simple button, and put a text align, whenever I click on it it moves a little to the side. How can I remove this? .NET 8, Windows Forms, Windows 10
11 Replies
ero
ero4mo ago
Please show what you mean
João Paulo
João PauloOP4mo ago
Ok
ero
ero4mo ago
Please show what you mean by "it moves a little to the side"
João Paulo
João PauloOP4mo ago
João Paulo
João PauloOP4mo ago
Done
Ꜳåąɐȁặⱥᴀᴬ
i may be wrong but i think that's because of the appearance of the buttons maybe touching the borders could 'adjust' this a little
João Paulo
João PauloOP4mo ago
adjusted border size, nothing changed
Mayor McCheese
Mayor McCheese4mo ago
Winforms resists customizations tbh. It's great for fast trash apps, if you're concerned about look and customizing controls don't use winforms. Wpf, Maui, etc are alternatives. They're designed to be customized.
João Paulo
João PauloOP4mo ago
Solved. button.GotFocus += RemoveFocus; private void RemoveFocus(object sender, EventArgs e) { this.ActiveControl = null; }

Did you find this page helpful?