-1

i am buling a project with vs2022 winform on .net-framework4.8. when i add a label(any control) control to windows form,i can cange control side by mouse as i like,it working fine.but if i change side by change size directly,then the return size didn't change according to my input value. for example, my original size is 267x36 if i want to change height to 30, the return value become 223x25, and the size and location on windows form also abnormal,looks like both change automatic. even i try to select two control, and use vs2022 button "make them same side",the second control also return a wrong size.enter image description here i am using a laptop with 150% scaling and screen resolution 2560x1600

picture1,original size picture2,return size2 picture3,windows form 3

  • A control you can lock/unlock the ratio of height and width (the aspect ratio). Check to se if object has aspect ration locked = true. – jdweng Apr 24 '22 at 17:41

1 Answers1

1

It's because AutoSize is set to true by default for labels. Disabling AutoSize will let you control the size manually.

NoobyGamr
  • 11
  • 5