有关日期时间选择器和Windows窗体分辨率的帮助 [英] Help regarding Date time Picker and Windows Form Resolution

查看:89
本文介绍了有关日期时间选择器和Windows窗体分辨率的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在使用Visual Studio 2013创建一个Windows应用程序。



是否可以将datetimepicker对象的值保留为局部变量而不是使用数据库?



我还想根据电脑的屏幕分辨率调整表格大小并缩放表格上的所有对象。



这是可能的。请尽快回复



最好的问候,



Bilal

Hi guys,

I am using Visual Studio 2013 to create a windows application.

Is it possible to retain the value of datetimepicker object to a local variable rather than using a database?

I also want to resize my form and scale all object on my form according the screen resolution of the PC.

Is that possible. please reply soon

best regards,

Bilal

推荐答案

是否可以将datetimepicker对象的值保留为局部变量而不是使用数据库?

是 - 您可以将其存储在一个DateTime并按照你想要的方式序列化它,理由是 - 你不必使用数据库:

"Is it possible to retain the value of datetimepicker object to a local variable rather than using a database?"
Yes - you can store it in a DateTime and serialize it any way you want, within reason - you don;t have to use a DB:
Dim myDate As DateTime  = myDateTimePicker.Value





我还想根据电脑的屏幕分辨率调整表格大小并缩放表格上的所有对象。



这是可能的。


是的,但是...通常我会说不要 - 它不能正常工作问题是,根据表格的大小按比例放大或缩小所有控件非常简单,但这不会影响控件的内容,只是它的外部尺寸。因此,您最终会得到一个大按钮,中间有一个小文本,或一个文本不适合的小按钮。在软件中实现这一目标是一个真正的PITA - 它并不是一个微不足道的命题!所以,除非你的应用程序像VS那样有一个中央工作区和可停靠控件围绕边缘,我会将它设计为特定大小,并保留它。

另一种选择是改为WPF,优雅地处理它,但是...这是一个学习曲线!



"I also want to resize my form and scale all object on my form according the screen resolution of the PC.

Is that possible."

Yes, but...generally I would say "don't - it doesn't work well" The problem is that it's pretty simple to enlarge or shrink all your control proportionally to the size of the form, but that doesn't affect the content of the control, just it's external dimensions. So you end up with a large button, with tiny text in the middle, or a tiny button with text that doesn't fit. Getting round that in software is a real PITA - it is not a trivial proposition as all! So, unless your app is organised like VS with a central working area and "dockable" controls round the edges, I would design it for a specific size, and leave it at that.
The alternative is to change to WPF, which handles it gracefully, but...that's one heck of a learning curve!


这篇关于有关日期时间选择器和Windows窗体分辨率的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆