When i write my programs in Visual Studio (2008), they run perfeclty at my computer: program's objects are placed as i did it in designer. But when i run programs on other computers, some objects are pla开发者_StackOverflowced wrong by few pixels: they touch other object. I suppose it is due to my monitor's resolution (1680x1050). I find that I can use TableLayoutPanel. Any other ideas to solve my problem? Thank you.
Why don't you set the size of your application's window to a desire resolution and see how it is rendered. This should render the GUI as if the application was running in those resolutions.
Another thing you may check is for how the size of the columns/rows on TableLayoutPanel are defined. You can set their size as a relative or absolute size. If you set it to an absolute size the objects should appear always on the same place.
I suggest you write a test application with as few controls possible where you can reproduce the issue.
Then, come back here to SO and describe exactly what situation you have
- which controls show that behaviour?
- does it only occur with TableLayoutPanel, or with other Panels, or without any Panel?
- does it only occur when the user changes the form's size?
Please post some code or screenshots.
精彩评论