Update cursor in an application with mouse move events.  Show tooltip like floating image next to the cursor with coords.

Posted on 2008-11-15
Last Modified: 2012-06-27
I'm working in ArcMap (vba and/or vb and/ or and would like to show the users current mouse movement dependent information  as they move their cursor.  For example, show users X, Y in a floating tooltip like box next to the current cursor.  Naturally, I could put this info in the status bar but want the user to get feedback directly from the cursor as they move it.  I'm thinking I could write a new icon each mouse move with updated text but can't think of a way to do this.
Question by:symman
    LVL 10

    Expert Comment

    How about this:

    1. Create a public variable on your form called myTTIP:

    Public myTTIP As New ToolTip

    2. On your Form's MouseMove event, do this:

    Private Sub Form1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove

            myTTIP.Show("Mouse Coords=" & e.X & ",  " & e.Y, Me)

    End Sub



    Author Comment

    Thanks Keith.  I'll check this out.  I'm still not sure if the client area in the ArcMap Appliation will respond but I'll check it out.  Any ideas for regular old vb6?

    LVL 10

    Expert Comment

    I started my VB experience with .Net, so I can't be much help with VB6.  Here are a couple of links I found that me be of help.

    Hope this helps.



    Accepted Solution

    Thanks again to those who responded.

    In the end I was able to find an object in my application, using the IDisplay interface (naturally) that provided access to a text function.  In the end I didn't get the niffy little floaty box but simply writing text to the screen as the mouse moved was suitable for my needs.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now