我做的软件可能要在1024 X 768 或者是800 X 600的屏幕下使用,而且一定要是全屏的,窗体大小能不能通过编程实现自动的变大变小,如果不行,那么我想给软件的FORM窗体加一个滚动轴,因为我开发的环境是1024*768的,如果在800*600下安装起来的话,能有滚动轴可以使窗体隐藏的部分也拉下来看到,如果有能自动随分辨率改变大小的软件就更好了。
...全文
13019打赏收藏
特招hamadou(闵峰),这次一定等到再结帖。其他人来回答也一样有分。
我做的软件可能要在1024 X 768 或者是800 X 600的屏幕下使用,而且一定要是全屏的,窗体大小能不能通过编程实现自动的变大变小,如果不行,那么我想给软件的FORM窗体加一个滚动轴,因为我开发的环境是1024*768的,如果在800*600下安装起来的话,能有滚动轴可以使窗体隐藏的部分也拉下来看到,如果有能自动随分辨率改变大小的软件就更好了。
Private x As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width()
Private y As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height()
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
me.width =x
me.height = y
End Sub
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
Private x As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width()
Private y As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height()
'在 InitializeComponent() 调用之后添加任何初始化
Public Sub New()
Private x As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width()
Private y As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height()
呵呵!
1.可以得到显示器分辨率,然后将窗体大小进行设置(在new中)
Private x As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width()
Private y As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height()
2.设置form的AutoScroll = True '显示滚动条!
可以获得显示器的分辨率,然后设置窗体的大小为这个!呵呵!
Private x As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width()
Private y As Integer = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height()