• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 774
  • Last Modified:

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

Hi
I'm working in ArcMap (vba and/or vb and/ or vb.net) 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.
0
symman
Asked:
symman
  • 2
  • 2
1 Solution
 
kdwoodCommented:
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

Regards,

Keith
0
 
symmanAuthor Commented:
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?

0
 
kdwoodCommented:
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.

http://www.thescarms.com/vbasic/tooltip.aspx
http://www.freevbcode.com/ShowCode.asp?ID=1232

Hope this helps.

Regards,

Keith
0
 
symmanAuthor Commented:
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.
 
Cheers.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now