在加载时对Windows窗体进行有害的拖动 [英] Disbale dragging of Windows Form on Load

查看:75
本文介绍了在加载时对Windows窗体进行有害的拖动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在应用程序运行时,如何使用户不喜欢拖动from使其变大,变宽和变高?

解决方案

私有  解决方案 

private void FixSize()
{
    MyForm.ActiveForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
}


Set the Form.FormBorderStyle property to Fixed3D, FixedDialog, or FixedSingle - the sizing handles will then disappear, and the user will not be able to change the size.


这篇关于在加载时对Windows窗体进行有害的拖动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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