打开窗体在C#中没有焦点 [英] Opening a form in C# without focus
本文介绍了打开窗体在C#中没有焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创造了一些总是在最上层的祝酒词为形式,当我打开他们,我希望他们不要从其他形式的,因为他们打开带走焦点。我怎样才能做到这一点?
感谢
解决方案
保护覆盖布尔ShowWithoutActivation
{
得到
{
返回真;
}
}
在您的表单代码覆盖此属性,它应该做的招适合你。
I am creating some always-on-top toasts as forms and when I open them I'd like them not to take away focus from other forms as they open. How can I do this?
Thanks
解决方案
protected override bool ShowWithoutActivation
{
get
{
return true;
}
}
Override this property in your form code and it should do the trick for you.
这篇关于打开窗体在C#中没有焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文