center label in window visual studio code example
Example: windows froms textalign to middle of parent
// To acchive this do the following steps:
// Set Label's 'AutoSize' property to False:
textbox1.AutoSize = false;
// TextAlign property to MiddleCenter
textbox1.TextAlignment = ControlAlignment.MiddleCenter;
// and Dock property to Fill.
textbox1.Dock = DockStyle.Fill;