Hi,
I would like to know how can i change the panel location where my pointer points?

you need to get the coordinates of mouse pointer and Set the location of panel to that new coordinates

@Pgmer
So how can i get the coordinates of the mouse pointer dynamically? So that, everytime i'll move my mouse pointer, it will get that coordinates. Thanks for the reply dude.. :)

Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As  System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
        Me.Panel1.Location = e.Location
        

    End Sub
but when user clicks you need to stop moving. else u will not have any option to come out... :)

Thanks for this one Pgmer, you help me a lot. I'm just new to vb.net. By the way, what I'm trying to figure out with this is, when I click a linklabel, the panel will pop up on the link label location. I have hundreds of link label in my form. That's why I would like it to become dynamic.

Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
Me.Panel1.Location = e.Location
 
 
End Sub

What you want to achieve? When you click on each link lable you will get the POPup? please explain.

Hi Pgmer,
Sorry for the delayed reply. I'll attached here the floor plan of the project. What I wanted to do is, when the user clicked on one of the link label,. the panel will appear, besides or near where the link label that the user clicked. Thanks a lot. :)

Hi Pgmer,
here's the image. I'm sorry I forgot to attach it on my previous reply.

Attachments Capture.PNG 140.85 KB

you need to get the location of Lable and show the popup? or you in mouseclick event of LinkLable show the popup message.

in mouseclick event of linklabel, a popup message will show. the popup message will show near the linklabel.

This article has been dead for over six months. Start a new discussion instead.