根据屏幕进行表格定位 [英] Form positioning according to the screen

查看:56
本文介绍了根据屏幕进行表格定位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须开发程序以使用不同尺寸的显示器。有些电脑屏幕将是15英寸。并且屏幕将是40" 。我如何设计表单大小   适合不同尺寸的屏幕。  我必须在
表格中添加一个数据网格视图控件。请你能给出解决方案 

I have to develop the program to use different size monitor .Some computer screen would be 15" and screen would be 40" . How I can design a form size    suitable to different size screen.  I have to add a data grid view control inside the form. Please can you give a solution 

问候

Pol

polachan

推荐答案

嗨polchan,

Hi polchan,

只需在Form_Load事件中添加以下代码即可。这将加载您的表单最大化。希望这会对你有所帮助。

Just add the following code in Form_Load event. This will load your form in maximized. Hope this helps you.

private void Form1_Load(object sender, EventArgs e)
{
     this.WindowState = FormWindowState.Maximized;
}

您可以像这样调整其他控制值:

And you can adjust the other control value like this:

tabControl1.Width = this.Width - 40;

这篇关于根据屏幕进行表格定位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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