这是我正在做的一件奇怪的事情,但是我如何在任务栏中设置 winform 表单的标题,但是not在其标题栏中?
一个可能的解决方案(对我来说效果很好)是覆盖 CreateParams 属性并设置要在任务栏中显示的标题:
protected override CreateParams CreateParams
{
get
{
new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Demand();
// Extend the CreateParams property of the Button class.
CreateParams cp = base.CreateParams;
// Update the button Style.
cp.Style &= ~0xC00000; //WS_CAPTION;
cp.Caption = PRODUCT_NAME;
return cp;
}
}
我希望这对你有用
Lisa
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)