如何使VB.net项目适应1920 * 1080到1366 * 768的分辨率 [英] how to fit the VB.net project to resolution from 1920*1080 to 1366*768
本文介绍了如何使VB.net项目适应1920 * 1080到1366 * 768的分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的作品中开发了一个VB.Net项目,分辨率是1920x1080,当我试图在我的笔记本电脑上使用它时,笔记本电脑的分辨率是1366x768,在我的笔记本电脑中它无法看到我的整个项目。
我的笔记本电脑屏幕上只能看到70%的项目,其余的我不能。
我不知道怎么解决这个
解决方案
自动缩放或表格(向上或向下分辨率)从来都不是很成功,除非整个应用程序有从头开始设计的灵活性 - 然后你最终得到像Visual Studio设计的东西,工作区域的大小灵活,工具是固定大小,但移动适合。
只需采用专为X by Y分辨率设计的表格,并将所有表格控件调整为X2的Y2将不起作用,因为控件内部使用的字体大小不会重新缩放控制 - 所以你最终得到一个小的textb带有大字符的牛,或者中间有一个小写字的巨大按钮。
您可以通过为不同的分辨率范围设置两个单独的表单设计来实现它,但这将是一个PITA维持。
认真吗?你有多少控件被推入一个大小的形式?您希望用户如何在桌面设置中找到任何内容?
考虑重新设计,以便您的表单一次显示可管理的数据量,并使用组,选项卡或辅助表单来整理控件的数量。
创建一个需要1920x1080的表单是疯狂的。你需要让表单响应
看一下这篇文章获取信息:
WinForms和TPL - 实现快速多任务和响应式用户界面 [ ^
I developed a VB.Net project in my worksytem and the resolution is 1920x1080, and when i tried to use it on my laptop the resolution of the laptop is 1366x768, and in my laptop it was unable to see my whole project.
I can see only 70% of my project on my laptop screen the rest i can't.
I dont know how to solve this
解决方案
Automatic "scaling" ort a form (either up or down resolution) is never very successful, unless the whole app has been designed with that flexibility designed in from scratch - and then you end up with something like a Visual Studio design, where the working area is flexibly sized, and the tools are "fixed size" but move around to fit.
Just taking a form designed for X by Y resolution and resizing all the form controls to X2 by Y2 won't work, as the font size used inside the controls doesn't rescale with the control - so you end up with a tiny textbox with big characters in it, or a huge button with tiny writing in the middle.
You may be able to do it by having two separate form designs for different resolution ranges, but that would be a PITA to maintain.
And seriously? How many controls have you shoved into a form that size? How do you expect the user to find anything, even on your "desktop" setting?
Consider redesigning so that your form presents a manageable amount of data at a time, and uses either groups, tabs, or secondary forms to sort out the number of controls.
Creating a form that requires 1920x1080 is crazy. You need to make your forms "responsive"
Take a look at this article for for information:
WinForms and TPL - Achieving quick Multitasking and Responsive User Interface[^]
这篇关于如何使VB.net项目适应1920 * 1080到1366 * 768的分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文