打开与最顶层= true的WinForm的,但并没有把偷重点是什么? [英] Opening a WinForm with TopMost=true but not having it steal focus?

查看:114
本文介绍了打开与最顶层= true的WinForm的,但并没有把偷重点是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用户的屏幕上弹出,并具有最顶层=真形式,但它偷的焦点。我怎样才能得到它的的窃取焦点第一次出现的时候吗?

I have a form that pops up on a user's screen and has TopMost=true, but it steals the focus. How can I get it to not steal focus when it first appears?

推荐答案

粘贴您的形式是code:

Paste this code in your form:

protected override bool ShowWithoutActivation
{
    get { return true; }
}

这篇关于打开与最顶层= true的WinForm的,但并没有把偷重点是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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