0

I'm trying to add to a project of a colleague which is an UI for a monitoring program. Adding new UI elements to the project or changing existing ones results in the designer recompiling the designer.cs in such a way that the UI is no longer as it should be.
The only changes made to the solution are in the designer.cs and the view.resx file. My colleague making the same change of moving the textbox results in no issue at all. I've verified that I'm using the same SDK, platforms and visual studio version. I've tried all I can think of like fresh installs, comparing settings etc. but can't seem to figure out the cause.

The changes don't have to be big either, as shown by moving a textbox 2 pixels to the left:

Example view of the UI as it should be without any UI changes made by me: UI working as intended

If I change the "stream to file" textbox 2 pixels to the left in the designer: UI with minimal changes made to 1 element

4
  • Have you used the designer with a different desktop zoom then the other developer? That is mostly not a good idea. At best always use 100% zoom. If you do a diff of the before and after designer.cs, at best via the compare tool of your versioning system, and you see that dpi settings changed that might be the source of your problem. Commented Oct 23, 2024 at 16:12
  • this sounds like it could be the issue, I'll try it out next time and let you know if that solves it. Commented Oct 25, 2024 at 12:36
  • It looks like this solved the issue. I feel stupid for missing this, but as a first-time user, I had no clue that the software's automatic scaling had an effect on the final outcome.. Thanks a lot! Commented Oct 28, 2024 at 9:13
  • Scaling shouldn't have that effect but you are sitting on pretty old technique with winforms from times when scaling wasn't a thought. Any scaling possible now is more of a retrofit then an actual feature of winforms. Commented Oct 28, 2024 at 11:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.