C#:设置工具提示气球中箭头的位置?

2023-12-11

是否可以更改气球工具提示中箭头/茎的位置? 更改的原因是因为位于屏幕顶部的按钮应该在其下方有一个工具提示。

已删除损坏的图像链接

上面是现在的情况,我只需要箭头位于气球的左上角即可。


我使用 InteropServices 调用多个 User32.dll 方法(CreateWindowEx、DestroyWindow、SetWindowPos 和 SendMessage),以使用本机 Win32 工具提示而不是 WinForms 提供的包装器。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Drawing;
using System.ComponentModel;

/// <remarks>This classes implements the balloon tooltip.
/// http://stackoverflow.com/questions/2028466
/// I hated Microsoft WinForms QA department after I had to develop my own version of the tooltip class,
/// just to workaround a bug, that would only add ~5 lines of code into the system.windows.forms.dll when fixed properly.</remarks>
class BalloonToolTip : IDisposable
{
    #region Unmanaged shit

    [DllImport( "user32.dll" )]
    static extern IntPtr CreateWindowEx( int exstyle, string classname, string windowtitle,
        int style, int x, int y, int width, int height, IntPtr parent,
        int menu, int nullvalue, int nullptr );

    [DllImport( "user32.dll" )]
    static extern int DestroyWindow( IntPtr hwnd );

    [DllImport( "user32.dll" )]
    static extern bool SetWindowPos( IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags );

    [DllImport( "user32.dll" )]
    static extern int SendMessage( IntPtr hWnd, int Msg, int wParam, IntPtr lParam );

    const int WS_POPUP = unchecked( (int)0x80000000 );
    const int TTS_BALLOON = 0x40;
    const int TTS_NOPREFIX = 0x02;
    const int TTS_ALWAYSTIP = 0x01;

    const int CW_USEDEFAULT = unchecked( (int)0x80000000 );

    const int WM_USER = 0x0400;

    IntPtr HWND_TOPMOST = new IntPtr( -1 );

    const int SWP_NOSIZE = 0x0001;
    const int SWP_NOMOVE = 0x0002;
    const int SWP_NOACTIVATE = 0x0010;

    const int WS_EX_TOPMOST = 0x00000008;

    [StructLayout( LayoutKind.Sequential )]
    public struct TOOLINFO
    {
        public int cbSize;
        public int uFlags;
        public IntPtr hwnd;
        public IntPtr id;
        private RECT m_rect;
        public IntPtr nullvalue;
        [MarshalAs( UnmanagedType.LPTStr )]
        public string text;
        public uint param;

        public Rectangle rect
        {
            get
            {
                return new Rectangle( m_rect.left, m_rect.top, m_rect.right - m_rect.left, m_rect.bottom - m_rect.top );
            }
            set
            {
                m_rect.left = value.Left;
                m_rect.top = value.Top;
                m_rect.right = value.Right;
                m_rect.bottom = value.Bottom;
            }
        }
    }

    [StructLayout( LayoutKind.Sequential )]
    struct RECT
    {
        public int left;
        public int top;
        public int right;
        public int bottom;
    }

    const int TTF_TRANSPARENT = 0x0100;
    const int TTF_TRACK = 0x0020;
    const int TTF_ABSOLUTE = 0x0080;

    #endregion

    #region Managed wrapper over some tooltip messages.
    // The most useful part of the wrappers in this section is their documentation.

    /// <summary>Send TTM_SETTITLE message to the tooltip.
    /// TODO [very low]: implement the custom icon, if needed. </summary>
    /// <param name="_wndTooltip">HWND of the tooltip</param>
    /// <param name="_icon">Standard icon</param>
    /// <param name="_title">The title string</param>
    internal static int SetTitle( IntPtr _wndTooltip, ToolTipIcon _icon, string _title )
    {
        const int TTM_SETTITLE = WM_USER + 33;

        var tempptr = IntPtr.Zero;
        try
        {
            tempptr = Marshal.StringToHGlobalUni( _title );
            return SendMessage( _wndTooltip, TTM_SETTITLE, (int)_icon, tempptr );
        }
        finally
        {
            if( IntPtr.Zero != tempptr )
            {
                Marshal.FreeHGlobal( tempptr );
                tempptr = IntPtr.Zero;
            }
        }
    }

    /// <summary>Send a message that wants LPTOOLINFO as the lParam</summary>
    /// <param name="_wndTooltip">HWND of the tooltip.</param>
    /// <param name="_msg">window message to send</param>
    /// <param name="_wParam">wParam value</param>
    /// <param name="_ti">TOOLINFO structure that goes to the lParam field. The cbSize field must be set.</param>
    internal static int SendToolInfoMessage( IntPtr _wndTooltip, int _msg, int _wParam, TOOLINFO _ti )
    {
        var tempptr = IntPtr.Zero;
        try
        {
            tempptr = Marshal.AllocHGlobal( _ti.cbSize );
            Marshal.StructureToPtr( _ti, tempptr, false );

            return SendMessage( _wndTooltip, _msg, _wParam, tempptr );
        }
        finally
        {
            if( IntPtr.Zero != tempptr )
            {
                Marshal.FreeHGlobal( tempptr );
                tempptr = IntPtr.Zero;
            }
        }
    }

    /// <summary>Registers a tool with a ToolTip control</summary>
    /// <param name="_wndTooltip">HWND of the tooltip</param>
    /// <param name="_ti">TOOLINFO structure containing information that the ToolTip control needs to display text for the tool.</param>
    /// <returns>Returns true if successful.</returns>
    internal static bool AddTool( IntPtr _wndTooltip, TOOLINFO _ti )
    {
        const int TTM_ADDTOOL = WM_USER + 50;
        int res = SendToolInfoMessage( _wndTooltip, TTM_ADDTOOL, 0, _ti );
        return Convert.ToBoolean( res );
    }

    /// <summary>Registers a tool with a ToolTip control</summary>
    /// <param name="_wndTooltip">HWND of the tooltip</param>
    /// <param name="_ti">TOOLINFO structure containing information that the ToolTip control needs to display text for the tool.</param>
    internal static void DelTool( IntPtr _wndTooltip, TOOLINFO _ti )
    {
        const int TTM_DELTOOL = WM_USER + 51;
        SendToolInfoMessage( _wndTooltip, TTM_DELTOOL, 0, _ti );
    }

    internal static void UpdateTipText( IntPtr _wndTooltip, TOOLINFO _ti )
    {
        const int TTM_UPDATETIPTEXT = WM_USER + 57;
        SendToolInfoMessage( _wndTooltip, TTM_UPDATETIPTEXT, 0, _ti );
    }

    /// <summary>Activates or deactivates a tracking ToolTip</summary>
    /// <param name="_wndTooltip">HWND of the tooltip</param>
    /// <param name="bActivate">Value specifying whether tracking is being activated or deactivated</param>
    /// <param name="_ti">Pointer to a TOOLINFO structure that identifies the tool to which this message applies</param>
    internal static void TrackActivate( IntPtr _wndTooltip, bool bActivate, TOOLINFO _ti )
    {
        const int TTM_TRACKACTIVATE = WM_USER + 17;
        SendToolInfoMessage( _wndTooltip, TTM_TRACKACTIVATE, Convert.ToInt32( bActivate ), _ti );
    }

    /// <summary>returns (LPARAM) MAKELONG( pt.X, pt.Y )</summary>
    internal static IntPtr makeLParam( Point pt )
    {
        int res = ( pt.X & 0xFFFF );
        res |= ( ( pt.Y & 0xFFFF ) << 16 );
        return new IntPtr( res );
    }

    /// <summary>Sets the position of a tracking ToolTip</summary>
    /// <param name="_wndTooltip">HWND of the tooltip.</param>
    /// <param name="pt">The point at which the tracking ToolTip will be displayed, in screen coordinates.</param>
    internal static void TrackPosition( IntPtr _wndTooltip, Point pt )
    {
        const int TTM_TRACKPOSITION = WM_USER + 18;
        SendMessage( _wndTooltip, TTM_TRACKPOSITION, 0, makeLParam( pt ) );
    }

    /// <summary>Sets the maximum width for a ToolTip window</summary>
    /// <param name="_wndTooltip">HWND of the tooltip.</param>
    /// <param name="pxWidth">Maximum ToolTip window width, or -1 to allow any width</param>
    /// <returns>the previous maximum ToolTip width</returns>
    internal static int SetMaxTipWidth( IntPtr _wndTooltip, int pxWidth )
    {
        const int TTM_SETMAXTIPWIDTH = WM_USER + 24;
        return SendMessage( _wndTooltip, TTM_SETMAXTIPWIDTH, 0, new IntPtr( pxWidth ) );
    }

    #endregion

    /// <summary>Sets the information that a ToolTip control maintains for a tool (not currently used).</summary>
    /// <param name="act"></param>
    internal void AlterToolInfo( Action<TOOLINFO> act )
    {
        const int TTM_GETTOOLINFO = WM_USER + 53;
        const int TTM_SETTOOLINFO = WM_USER + 54;

        var tempptr = IntPtr.Zero;
        try
        {
            tempptr = Marshal.AllocHGlobal( m_toolinfo.cbSize );
            Marshal.StructureToPtr( m_toolinfo, tempptr, false );

            SendMessage( m_wndToolTip, TTM_GETTOOLINFO, 0, tempptr );

            m_toolinfo = (TOOLINFO)Marshal.PtrToStructure( tempptr, typeof( TOOLINFO ) );

            act( m_toolinfo );

            Marshal.StructureToPtr( m_toolinfo, tempptr, false );

            SendMessage( m_wndToolTip, TTM_SETTOOLINFO, 0, tempptr );
        }
        finally
        {
            Marshal.FreeHGlobal( tempptr );
        }
    }

    readonly Control m_ownerControl;

    // The ToolTip's HWND
    IntPtr m_wndToolTip = IntPtr.Zero;

    /// <summary>The maximum width for a ToolTip window.
    /// If a ToolTip string exceeds the maximum width, the control breaks the text into multiple lines.</summary>
    int m_pxMaxWidth = 200;

    TOOLINFO m_toolinfo = new TOOLINFO();

    public BalloonToolTip( Control owner )
    {
        m_ownerControl = owner;

        // See http://msdn.microsoft.com/en-us/library/bb760252(VS.85).aspx#tooltip_sample_rect
        m_toolinfo.cbSize = Marshal.SizeOf( typeof( TOOLINFO ) );
        m_toolinfo.uFlags = TTF_TRANSPARENT | TTF_TRACK;
        m_toolinfo.hwnd = m_ownerControl.Handle;
        m_toolinfo.rect = m_ownerControl.Bounds;
    }

    /// <summary>Throws an exception if there's no alive WIN32 window.</summary>
    void VerifyControlIsAlive()
    {
        if( IntPtr.Zero == m_wndToolTip )
            throw new ApplicationException( "The control is not created, or is already destroyed." );
    }

    /// <summary>Create the balloon window.</summary>
    public void Create()
    {
        if( IntPtr.Zero != m_wndToolTip )
            Destroy();

        // Create the tooltip control.
        m_wndToolTip = CreateWindowEx( WS_EX_TOPMOST, "tooltips_class32",
            string.Empty,
            WS_POPUP | TTS_BALLOON | TTS_NOPREFIX | TTS_ALWAYSTIP,
            CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
            m_ownerControl.Handle, 0, 0, 0 );

        if( IntPtr.Zero == m_wndToolTip )
            throw new Win32Exception();

        if( !SetWindowPos( m_wndToolTip, HWND_TOPMOST,
                    0, 0, 0, 0,
                    SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE ) )
            throw new Win32Exception();

        SetMaxTipWidth( m_wndToolTip, m_pxMaxWidth );
    }

    bool m_bVisible = false;

    /// <summary>return true if the balloon is currently visible.</summary>
    public bool bVisible
    {
        get
        {
            if( IntPtr.Zero == m_wndToolTip )
                return false;
            return m_bVisible;
        }
    }

    /// <summary>Balloon title.
    /// The balloon will only use the new value on the next Show() operation.</summary>
    public string strTitle;

    /// <summary>Balloon title icon.
    /// The balloon will only use the new value on the next Show() operation.</summary>
    public ToolTipIcon icon;

    /// <summary>Balloon title icon.
    /// The new value is updated immediately.</summary>
    public string strText
    {
        get { return m_toolinfo.text; }
        set
        {
            m_toolinfo.text = value;
            if( bVisible )
                UpdateTipText( m_wndToolTip, m_toolinfo );
        }
    }

    /// <summary>Show the balloon.</summary>
    /// <param name="pt">The balloon stem position, in the owner's client coordinates.</param>
    public void Show( Point pt )
    {
        VerifyControlIsAlive();

        if( m_bVisible ) Hide();

        // http://www.deez.info/sengelha/2008/06/12/balloon-tooltips/
        if( !AddTool( m_wndToolTip, m_toolinfo ) )
            throw new ApplicationException( "Unable to register the tooltip" );

        SetTitle( m_wndToolTip, icon, strTitle );

        TrackPosition( m_wndToolTip, m_ownerControl.PointToScreen( pt ) );

        TrackActivate( m_wndToolTip, true, m_toolinfo );

        m_bVisible = true;
    }

    /// <summary>Hide the balloon if it's visible.
    /// If the balloon was previously hidden, this method does nothing.</summary>
    public void Hide()
    {
        VerifyControlIsAlive();

        if( !m_bVisible ) return;

        TrackActivate( m_wndToolTip, false, m_toolinfo );

        DelTool( m_wndToolTip, m_toolinfo );

        m_bVisible = false;
    }

    /// <summary>Destroy the balloon.</summary>
    public void Destroy()
    {
        if( IntPtr.Zero == m_wndToolTip )
            return;
        if( m_bVisible ) Hide();

        DestroyWindow( m_wndToolTip );
        m_wndToolTip = IntPtr.Zero;
    }

    void IDisposable.Dispose()
    {
        Destroy();
    }
}

这是我的文章,有完整的源代码.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

C#:设置工具提示气球中箭头的位置? 的相关文章

  • 为什么存在 async 关键字

    浏览 msdn 9 频道视频时 我发现以下未答复的评论 希望有人能解释一下 我不明白 async 关键字的意义 为什么不直接允许 任何时候方法返回任务时都会使用await关键字 就像迭代器一样 可以在任何返回 IEnumerable 的方法
  • 通过增加索引之和来生成排序组合的有效方法

    对于启发式算法 我需要一个接一个地评估特定集合的组合 直到达到停止标准 由于它们很多 目前我正在使用以下内存高效迭代器块生成它们 受到 python 的启发 itertools combinations http docs python o
  • 在 VS2017 下使用 Conan 和 CMake 项目进行依赖管理

    我正在尝试使用 CMake 与 VS2017 集成为 C 设置一个开发环境 以便在 Linux x64 下进行编译 为了更好地管理依赖关系 我选择使用 Conan 但我对这个软件还很陌生 我想知道让 VS2017 识别项目依赖关系的最佳方法
  • Subversion 和 Visual Studio 项目的最佳实践

    我最近开始在 Visual Studio 中处理各种 C 项目 作为大型系统计划的一部分 该系统将用于替换我们当前的系统 该系统是由用 C 和 Perl 编写的各种程序和脚本拼凑而成的 我现在正在进行的项目已经达到了颠覆的临界点 我想知道什
  • C++中delete和delete[]的区别[重复]

    这个问题在这里已经有答案了 可能的重复 C 中的删除与删除 运算符 https stackoverflow com questions 2425728 delete vs delete operators in c 我写了一个包含两个指针的
  • 在 C# Winforms 应用程序中嵌入 Windows XP 主题

    我有一个旧版 C Windows 窗体应用程序 其布局是根据 Windows XP 默认主题设计的 由于需要将其作为 Citrix 应用程序进行分发 该应用程序现在看起来像经典主题应用程序 因为 Citrix 不鼓励使用主题系统服务 所以
  • 从 C 结构生成 C# 结构

    我有几十个 C 结构 我需要在 C 中使用它们 典型的 C 结构如下所示 typedef struct UM EVENT ULONG32 Id ULONG32 Orgin ULONG32 OperationType ULONG32 Size
  • HttpWebRequest vs Webclient(特殊场景)

    我知道这个问题之前已经回答过thread https stackoverflow com questions 1694388 webclient vs httpwebrequest httpwebresponse 但我似乎找不到详细信息 在
  • TcpClient 在异步读取期间断开连接

    我有几个关于完成 tcp 连接的问题 客户端使用 Tcp 连接到我的服务器 在接受客户端后listener BeginAcceptTcpClient ConnectionEstabilishedCallback null 我开始阅读netw
  • OpenCV 2.4.3 中的阴影去除

    我正在使用 OpenCV 2 4 3 最新版本 使用内置的视频流检测前景GMG http docs opencv org modules gpu doc video html highlight gmg gpu 3a 3aGMG GPU算法
  • 使用 WF 的多线程应用程序的错误处理模式?

    我正在写一个又长又详细的问题 但只是放弃了它 转而选择一个更简单的问题 但我在这里找不到答案 应用程序简要说明 我有一个 WPF 应用程序 它生成多个线程 每个线程执行自己的 WF 处理线程和 WF 中的错误 允许用户从 GUI 端进行交互
  • 二叉树中的 BFS

    我正在尝试编写二叉树中广度优先搜索的代码 我已将所有数据存储在队列中 但我不知道如何访问所有节点并消耗它们的所有子节点 这是我的 C 代码 void breadthFirstSearch btree bt queue q if bt NUL
  • .NET 客户端中 Google 表格中的条件格式请求

    我知道如何在 Google Sheets API 中对值和其他格式进行批量电子表格更新请求 但条件格式似乎有所不同 我已正确设置请求 AddConditionalFormatRuleRequest formatRequest new Add
  • 0-1背包算法

    以下 0 1 背包问题是否可解 浮动 正值和 浮动 权重 可以是正数或负数 背包的 浮动 容量 gt 0 我平均有 这是一个相对简单的二进制程序 我建议用蛮力进行修剪 如果任何时候你超过了允许的重量 你不需要尝试其他物品的组合 你可以丢弃整
  • C 中带有指针的结构的内存开销[重复]

    这个问题在这里已经有答案了 我意识到当我的结构包含指针时 它们会产生内存开销 这里有一个例子 typedef struct int num1 int num2 myStruct1 typedef struct int p int num2
  • 如何引用解决方案之外的项目?

    我有一个 Visual Studio C 解决方案 其中包含一些项目 其中一个项目需要引用另一个不属于解决方案的项目 一开始我引用了dll
  • Visual Studio 2017 完全支持 C99 吗?

    Visual Studio 的最新版本改进了对 C99 的支持 最新版本VS2017现在支持所有C99吗 如果没有 C99 还缺少哪些功能 No https learn microsoft com en us cpp visual cpp
  • C语言声明数组没有初始大小

    编写一个程序来操纵温度详细信息 如下所示 输入要计算的天数 主功能 输入摄氏度温度 输入功能 将温度从摄氏度转换为华氏度 独立功能 查找华氏度的平均温度 我怎样才能在没有数组初始大小的情况下制作这个程序 include
  • OSError: [WinError 193] %1 不是有效的 Win32 应用程序,同时使用 CTypes 在 python 中读取自定义 DLL

    我正在尝试编写用 python 封装 C 库的代码 我计划使用 CTypes 来完成此操作 并使用 Visual Studio 来编译我的 DLL 我从一个简单的函数开始 在 Visual Studio 内的标头中添加了以下内容 然后将其构
  • 如何使用 C# 以低分辨率形式提供高分辨率图像

    尝试使用 300dpi tif 图像在网络上显示 目前 当用户上传图像时 我正在动态创建缩略图 如果创建的页面引用宽度为 500x500px 的高分辨率图像 我可以使用相同的功能即时转换为 gif jpg 吗 将创建的 jpg 的即将分辨率

随机推荐

  • 使用 Firebase 函数中的 Cloud SQL 代理

    我正在运行谷歌的云 SQL 代理在本地 它使用本地服务的 Firebase 功能 使用如下命令 cloud sql proxy instances my project 12345 us central1 my instance tcp 1
  • 如何在列表视图中拥有高级列表项

    我想让我的列表项看起来像这样 我有一个具有与其关联的 值的项目列表 这个布局看起来真的很吸引人 谁能告诉我如何做到这一点 这是我尝试过的代码
  • $.ajaxSetup 中的 beforeSend + $.ajax 中的 beforeSend

    为了解决 CSRF 问题 我使用 Ajax 客户端设置 ajaxSetup beforeSend function xhr settings function getCookie name var cookieValue null if d
  • Java 中的互斥量和信号量是什么?主要区别是什么?

    Java 中的互斥量和信号量是什么 主要区别是什么 不幸的是 每个人都忽略了信号量和互斥体之间最重要的区别 的概念 所有权 信号量没有所有权的概念 这意味着任何线程都可以释放信号量 这本身可能会导致许多问题 但有助于 死亡检测 而互斥体确实
  • 在 C/C++ 中写入非打印字符的行为是什么?

    如果字符是通过写入的 则写入非打印字符的行为是否未定义或实现定义printf fprintf 我很困惑 因为 C 标准 N1570 5 2 2 中的单词只讨论打印字符和字母转义序列的显示语义 另外 如果字符是通过写的呢 std ostrea
  • 检测SD卡硬件驱动器盘符

    有没有办法在 Windows 上以编程方式检测 SD 卡的驱动器盘符 该方法是否支持内部和外部 SD 卡硬件 感谢您的时间 你可以试试获取逻辑驱动器字符串获取驱动器号 然后使用获取驱动器类型查看驱动器是否可移动 然后您可以获得更多的设备信息
  • RSelenium 和 Javascript

    我对 R 相当精通 但对 javaScript 和其他语言完全一无所知 我想访问有关此公开数据集的信息 http fyed elections on ca fyed en form page en jsp 特别是 我在数据框中有一个包含数千
  • JQuery限制两个日期选择器之间的差异

    我有 2 个日期选择器 function DateFrom datepicker onSelect showUser minDate 90 maxDate 1D function DateTo datepicker onSelect sho
  • 如何使用 Spring MVC 和多种响应类型支持 JSONP

    我在控制器中有一个方法 它将根据要求返回 HTML 或 JSON 这是这种方法的一个精简示例 根据我在中找到的有关如何执行此操作的信息进行建模这个问题 RequestMapping value callback public ModelAn
  • 无法在 Jupyter Notebook 中导入 Tensorflow

    我尝试在 conda 环境中的 Jupyter 笔记本中导入 Tensorflow 模块 但出现以下错误 AttributeError type object h5py h5 H5PYConfig has no attribute redu
  • Unity3D - 在 Android 上接到任何呼叫/通知后音频播放变得静音

    我在 Android 版本上遇到音频播放问题 我使用的是 Unity 5 4 0b15 但我在 5 3 4p3 上遇到了同样的问题 我在场景中的 AudioPlayer 游戏对象中添加了用于播放背景音乐的简单组件 public AudioC
  • AS3中的实时更新和推送数据

    我想对我的 Flash 应用程序进行实时更新 我更喜欢推送技术 而不是每 30 秒刷新一次 在 Actionscript 3 中推送数据的最佳方式是什么 有两种流行的实现实时更新的选项 套接字和 RTMP 每种方法都有优点和缺点 但主要决定
  • 使用 JasperReports API 在代码中出现“java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory”

    我正在开发一个简单的独立桌面应用程序 它将根据传递给程序的值生成报告 没有数据库使用 我已经使用 iReport 设计器设计了 JasperReports 报表并添加了一个参数ID NO和一个带有表达式的文本字段 P ID NO 我可以成功
  • 无法修改全局 int,但可以修改列表。如何?

    列表 VAR1 0 def foo VAR1 1 返回VAR1 通话中foo 我收到此错误 UnboundLocalError local variable VAR1 referenced before assignment 但是 请考虑该
  • 陷阱标志(TF)和监视器陷阱标志之间的区别?

    像 GDB 这样的调试功能通过设置 eflags 寄存器的 TF 标志来工作 这会在处理器每次执行指令后引发异常 让 gdb 等工具控制调试 当我们运行虚拟机 Ex 时 在 kvm 的情况下执行以下操作同样 您需要设置一个名为 MONITO
  • 如何从表中选择所有列以及 ROWNUM 等其他列?

    在Oracle中 可以做一个SELECT将行号作为结果集中的列返回的语句 例如 SELECT rownum column1 column2 FROM table returns rownum column1 column2 1 Joe Sm
  • 如何使CSS平滑过渡

    我怎样才能得到像这样的CSS转换示例here 下拉示例 到目前为止 我已经成功地只更改了文本和背景颜色 但没有更改整个过渡效果 矩形在悬停时滚动 在未悬停时平滑回滚 知道我该如何做吗 实现这一目标 这是我的代码 a menulink tex
  • 使用多处理进行日志记录

    我确实有以下内容logger类 如 logger py import logging logging handlers import config log logging getLogger myLog def start Function
  • android:如何测量智能手机产生的流量?

    我需要监控哪些服务 应用程序为我的手机产生了哪些流量 以 kbit s 为单位 按上行链路和下行链路分隔 我该怎么做呢 我用谷歌搜索但没有找到任何有用的帖子 操作方法 答案是 TrafficStats 类 在这里 您可以获得传输的字节和 或
  • C#:设置工具提示气球中箭头的位置?

    是否可以更改气球工具提示中箭头 茎的位置 更改的原因是因为位于屏幕顶部的按钮应该在其下方有一个工具提示 已删除损坏的图像链接 上面是现在的情况 我只需要箭头位于气球的左上角即可 我使用 InteropServices 调用多个 User32