Web Development

General discussion


Attach text (string) with mouse pointer?

By trupti_korde ·

I want to attach string with the mouse pointer so that whenever i will move the mouse that string also moves with the pointer.

please tell me how to do this...


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Using VB

by Murali Bala In reply to Attach text (string) with ...

This is a simple way to implement...in Visual Baisc..i am sure there are other (better) ways to do it...

1. Drop a label on the form
2. Copy the following code

Private Sub Form_Load()
Label1.Caption = "Hello World"
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Top = Y
Label1.Left = X
End Sub

Hope this helps.

Related Discussions

Related Forums