Results 1 to 3 of 3

Thread: [RESOLVED] Relative to container not screen

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    125

    Resolved [RESOLVED] Relative to container not screen

    I have a panel that is called "Self" and I would like to make it follow the exact mouse movements.

    I have done this. However it is not centred with the mouse and is reliant upon where the form is located on the screen. I don't want this.

    VB Code:
    1. Private Sub Self_FollowMouse_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Self_FollowMouse.Tick
    2.         X = Control.MousePosition.X
    3.         Y = Control.MousePosition.Y
    4.         Self.Location = New Point(X - 5, Y - 5)
    5.     End Sub

    How do I solve this problem. thanks.
    Last edited by emdiesse; Jun 24th, 2006 at 11:36 AM.
    Emdiesse

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width