当前位置:网站首页>WinForm implementation window is always at the top level

WinForm implementation window is always at the top level

2022-06-25 07:44:00 ※※ Bingxin ※※

Form properties TopMost:
Gets or sets a value , Indicates whether the form should be displayed as the topmost form .
Set to true, Display the form as the topmost form ; Set to false On the contrary . The default value is false.

Simple example :

        private void TopMost_button_Click(object sender, EventArgs e)
        {
            if (this.TopMost)
            {
                this.TopMost = false;
                TopMost_button.Text = " Fixed top layer ";
            }
            else 
            {
                this.TopMost = true;
                TopMost_button.Text = " Cancel top ";
            }
        }

原网站

版权声明
本文为[※※ Bingxin ※※]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250541235582.html