How to fix the size of a C# Windows Form Application from resizing
c#, winforms
Solution
Try setting the `AutoScaleMode` property for the form to `none`. This should prevent resizing even if the DPI resolution is different on different machines.
Problem
I have a C# Windows Form application that I am working on and when I build the form on the development PC it looks fine but when I move the exe onto another machine everything resizes. This then through's out the picturebox and button controls. I have specified the size of the controls in VS but it seems to ignore these. I have also fixed the minimum and maximum sizes to be the same but this has not resolved the issue. Can anyone point me the direction of something that I have missed as I need to fix the size of the controls. Thanks in advance. New PC Development PC ``` this.interviewPb.Image = ((System.Drawing.Image(resources.GetObject("interviewPb.Image"))); this.interviewPb.Location = new System.Drawing.Point(771, 366); this.interviewPb.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.interviewPb.Name = "interviewPb"; this.interviewPb.Size = new System.Drawing.Size(393, 492); this.interviewPb.TabIndex = 9; this.interviewPb.TabStop = false; ```