我们如何动态设置页面 [英] How we set the Page Dynamically
本文介绍了我们如何动态设置页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的先生,
我在vb.net中创建了一个窗口表单,当我们单击菜单按钮时,我将最大化并最小化页面的我想要的按钮,页面会根据编码通过我们想要的系统屏幕自动设置为全屏.请帮助我,先生,我非常感激先生
谢谢
Arvind Kumar Singh
Dear Sir,
I create a window form in vb.net ,i false the maximize and minimize buton of page i want when we Click the menu Button the page is automatically set the full screen according the system screen we want through coding . Plz Help me sir i very confussed sir
Thank
Arvind Kumar Singh
推荐答案
你好Arvind
在C#中,您可以像这样
Hello Arvind
In C# you can do it like this
<br />
//for maximize<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
this.WindowState = FormWindowState.Maximized;<br />
}<br />
//to return in normal size<br />
private void button2_Click(object sender, EventArgs e)<br />
{<br />
this.WindowState = FormWindowState.Normal;<br />
}<br />
//for Minimize<br />
private void button3_Click(object sender, EventArgs e)<br />
{<br />
this.WindowState = FormWindowState.Minimized;<br />
}<br />
适用于VB.net
您可以使用
for VB.net
you can use
Me.WindowState = FormWindowState.Maximized
您可以像这样遍历Application.Forms集合
You can iterate through the Application.Forms collection like so
For Each frm As Form in Application.OpenForms
frm.WindowState = FormWindowState.Minimized
Next frm
谢谢,
Imdadhusen
Thanks,
Imdadhusen
这篇关于我们如何动态设置页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文