我如何防止弹出的形式从父服用焦点

我如何防止弹出的形式从父服用焦点

本文介绍了我如何防止弹出的形式从父服用焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我使用呈现信息,当鼠标悬停在一个windows.Form地区小windows.form,但它从父窗口的焦点,当它被设置为可见。有没有防止这种W的方式 - 它会导致主要形式闪​​烁,因为它的重点和退出之间切换

I have a small windows.form that I use to present information when the mouse is over a regions on a windows.Form, however it takes the focus from the parent window when it is set to visible. Is there w way of preventing this - it causes the main form to flicker as it toggles between in focus and out.

C#.NET 2.0,System.Windows.Forms的

c#, .net 2.0, system.windows.forms

推荐答案

粘贴到您的弹出窗体类此,它阻止它所示,当被激活:

Paste this into your popup form class, it prevents it from being activated when shown:

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

这篇关于我如何防止弹出的形式从父服用焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 06:29