Hi,

After I make a GUI program on my computer nicely, every object in the form often changes in its location and size in different computer.
I know it is because the monitor resolution is different and there are several solutions on the web but none of them actually works perfectly.

Please tell me the best solution for it based on your own experience..

If we're just talking about C#/.NET, I've had a much better experience with WPF over WinForms. As long as you know what you are doing, it can be pretty easy to make some fairly complex GUI's work very well across different systems. No solution will ever be perfect though...

I made a 20x20 picturebox in a form using drag-and-drop form design tool of VS2010 in my computer and loaded a 20x20 image in it. But when I open the same solution in different computer it becomes a 17X21 picturebox with 20x20 image. I know this is because of different monitor resolution. But the manually inserted numbers in the design tool keep changing and this is not right. 20x20 picturebox must look like 20x20 picturebox in all resolutions just like image's size stays. I can suppose screen output would look different but actual size number must stay the same.

I am feeling this is more than a code issue. There must some sort of settings that prevent object size rescaling. How do you think?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.