Discussion Locked

Attach text (string) with mouse pointer?

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi

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...

Trupti.

1 reply

by murali bala

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.

This discussion is closed to new replies.