最大化和标准化按钮 [英] maximize and normalize button

查看:59
本文介绍了最大化和标准化按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置自定义最大化和规范化按钮.....如何在同一按钮中执行此操作,一次单击其最大化并再次单击其规范化操作

how to set custom maximize and normalize button .....how to do it in the same button once click its maximize and again click its normalize how to do it

推荐答案

您的意思是这样的吗: Visual Basic 2008:添加自定义最小化和关闭"按钮 [ ^ ]
Do you mean something like this: Visual Basic 2008: Add Custom Minimize and Close button[^]


放置一个按钮,并在button_click事件中,您需要编写如下内容
示例代码:
Place a button and in the button_click event you need to write some thing like this
Sample code:
private void button1_Click(object sender, EventArgs e)
{   if(windowstate==FormWindowState.Maximized)
     {
       WindowState = FormWindowState.Minimized;
     }
    else
     {
        WindowState = FormWindowState.Maximized;

     }
    
}



谢谢,
SP



Thanks,
SP


如果WindowState = FormWindowState.Normal然后

WindowState = FormWindowState.Maximize
其他

WindowState = FormWindowState.Normal
如果结束
If WindowState = FormWindowState.Normal Then

WindowState = FormWindowState.Maximize
Else

WindowState = FormWindowState.Normal
End If


这篇关于最大化和标准化按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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