且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

打开窗体在C#中没有焦点

更新时间:2023-12-06 15:36:04

 保护覆盖布尔ShowWithoutActivati​​on 
{
得到
{
返回真;
}
}

在您的表单代码覆盖此属性,它应该做的招适合你。


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.