显示工具提示的最小化,最大化和关闭位置在哪里? [英] Show tooltip where the minimize, maxmize and close is at?

查看:87
本文介绍了显示工具提示的最小化,最大化和关闭位置在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您将鼠标悬停在标题或窗口框架上的最小,最大和关闭位置时,如何显示工具提示.表单的图标和标题在哪里?我想在那里显示工具提示.我什至不知道它叫什么.


[edit]已删除虚假的关闭标签-OriginalGriff [/edit]

How do you show a tooltip when you hover over your mouse on the title or window frame thing where the min, max, and close is at. Where the icon and title of the form is at? I want to show a tool tip there. I dont even know what it is called.


[edit]Spurious close tags removed - OriginalGriff[/edit]

推荐答案

它称为标题栏(如果您查看桌面属性,位于外观"下"..."高级",您将找到各个Windows显示部件的名称)

就工具提示而言,我认为您处在松散状态-我不知道如何获取.NET中的现有工具提示,因此,即使不是不可能,也很难更改它.我什至不确定我是否可以在MFC中使用它...但是自从我使用它已经很长时间了!
It''s called the Title Bar (if you look at your Desktop properties, under "Appearance"..."Advanced" you will find the names of various windows display parts)

As far as tooltips go, I think you are on a looser - there is no way I know of to get the existing tooltip in .NET, so changing it will be difficult if not impossible. I''m not even sure I could do it in MFC...but it has been a long time since I used that!


如果有可能的话,可能必须使用pInvoke和一个或多个Windows API函数来执行此操作.为什么要向这些按钮添加工具提示?

编辑(注释后)==============

然后,您可能想找到一种方法来处理标题栏的WM_NCMOUSEMOVE事件(重写WndProc()).我不确定您将如何在.Net中进行此操作,但google可能会提出一些建议.

覆盖WndProc将如下所示:

If it''s possible at all, you''re probably going to have to use pInvoke and one or more Windows API functions to do it. Why do you want to add tooltips to those buttons?

EDIT (after comment) ==============

You might want to find a way to handle the WM_NCMOUSEMOVE event (override WndProc()) for the titlebar, then. I''m not sure how you''d go about doing that in .Net, but google may come up with something.

Overriding WndProc would look like this:

protected Override void WndProc(System.Windows.Forms.Message msg)
{
    switch (msg.Msg)
    {
        case WM_NCMOUSEHOVER :
            MyBase.WndProc(m) 
            // do a hit test to see where the mouse is hovering and respond accordingly
            // possible hit test values are HTCLOSE (close button) HTCAPTION (titlebar), etc
            break;
    }
...
}


这篇关于显示工具提示的最小化,最大化和关闭位置在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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