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
ero5d ago
Please show what you mean
João Paulo
João PauloOP5d ago
Ok
ero
ero5d ago
Please show what you mean by "it moves a little to the side"
João Paulo
João PauloOP5d ago
João Paulo
João PauloOP5d ago
Done
FestivalDelGelato
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 PauloOP5d ago
adjusted border size, nothing changed
Mayor McCheese
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 PauloOP4d ago
Solved. button.GotFocus += RemoveFocus; private void RemoveFocus(object sender, EventArgs e) { this.ActiveControl = null; }

Did you find this page helpful?