Use of My.Settings is Resizing the Form

raklali 236 Reputation points
2022-01-09T04:38:33.14+00:00

In my Form1_Load(), I have included a statement to TextBox1.Text = My.Settings.UserName, UserName is the Name of the Setting created using the Project=>Properties tab.

On executing the code, the window is getting resized. Also, the same window resizing problem occurs when attempting to save the value to My.Settings.UserName.

I have tried everything, moving the statement to Form1_Activated(), called using a Sub, loading on Click of Button, etc but Window resizing problem remains.

Binging the issues shows that this problem exists since VB-2015 onwards.

Any solution to circumvent this problem?

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,579 questions
{count} votes