Difference on screen Windows Forms C#

Asked

Viewed 232 times

-1

I have a problem with Visual Studio > Windows Forms. When I enable the classic Windows theme and create a project in C# the screen is inside what I want, however, when enabling Aero mode, the right side of the screen is misaligned. Just below is a print of the difference (distance on the left side differs on the right side).

inserir a descrição da imagem aqui

  • 1

    Clarify your specific issue or add other details to highlight exactly what you need. The way it’s written here, it’s hard to know exactly what you’re asking. See the page How to ask for help in clarifying this question.

  • it seems to me that it has to do with the border size of the form

3 answers

2

This is common. There are several factors that change the "real size" of the form. Like, for example, the edges or even that shadow that is "behind" the window in Windows 10.

What you can do is work with operating system functions to try to deal with this.

Maybe this response from the OS may help you. Since I don’t know what your goal is, I can’t indicate anything more than that.

  • So you need to do something to maintain the same standard for all visuals.

  • There’s no way to maintain pattern magically. You’d have to calculate dimensions all the time or use panels and anchors.

0

I managed to solve, the problem was in the minimum size and maximum size of Forms.

0

Usually you putting 6-8 wide panels on the edges avoids this kind of problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.