开发者

portable windows form [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

WinForms Different DPI Layouts

I have made an application which uses high number of pictureboxes in a windows form. I have successfully completed the project. But my problem started when i deployed the application onto my friends laptop which has a smaller display screen. Not all pictureboxes and controls were visible. i.e. some controls went out-of form and were inaccessable.

Actually I had developed the application on my desktop 开发者_如何学运维which has larger display screen. How do I make the form portable so that inspite of display screen variation, the controls are correctly displayed?

I know it is a simple problem of Normalized co-ordinates...But I dont want to sit down and plan the co-ordinates (like : Screen 1unit length and 1 unit breadth. So 1st conrtol at 0.25,0.3 position) coz it will waste my time as the application has vast pictureboxes and controls.

Isnt there a tool in Visual studio which will automatically use normalized co-ordinates and maintain it in the deploy file so that it is portable?????


There is a tool. Its called WPF. It has device independant graphics which renders the same, regardless of the size.

Other then that, you will have to manually normalize it yourself


use TableLayoutPanel and position your controls within the cells of the table, which will care on resizing

use Anchor/Docking property of controls for correct relative alignment.

Regards.


Have you looked at using a FlowLayoutPanel with the AutoSize property enabled? You can build it so its dynamically sized at runtime.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜