•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 401,571 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,368 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 35069 | Replies: 8
![]() |
•
•
Join Date: Oct 2004
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Originally Posted by vbpro
How can I get the Mouse Position from the mousemove event inthe VB.net?
I can't find out how to do this.. :rolleyes:
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
Label1.Text = "X." & e.X & vbCrLf & "Y." & e.Y
End Sub •
•
Join Date: Jul 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove Label1.Text = "X." & e.X & vbCrLf & "Y." & e.Y End Sub
hi,
but these code above only works inside the form.
how to get the mouse coordinates / position by using VB2005.NET in anywhere?
you cant get the coordinates of the pointer outside the form..
if you wish to.. customize windows!! :lol:
if you wish to.. customize windows!! :lol:
•
•
Join Date: Apr 2005
Location: Old Hampshire, Old England (LOL)
Posts: 11,937
Reputation:
Rep Power: 30
Solved Threads: 268
you would need to use DirectX or something for that
TRY MY SUGGESTIONS AT YOUR OWN RISK!
james.bennet1@ntlworld.com
james.bennet1@ntlworld.com
•
•
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,213
Reputation:
Rep Power: 4
Solved Threads: 78
•
•
Join Date: Apr 2005
Location: Old Hampshire, Old England (LOL)
Posts: 11,937
Reputation:
Rep Power: 30
Solved Threads: 268
Dim MyPointAPI As POINTAPI Private Type POINTAPI X As Long Y As Long End Type Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Public Sub Timer1_Timer() l = GetCursorPos(MyPointAPI) Label1.Caption = CStr(MyPointAPI.X) & ", " & CStr(MyPointAPI.Y) End Sub
Last edited by Skullmagic : Jul 25th, 2007 at 4:38 am. Reason: Don't look good!!!
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Simulate Mouse Move (C++)
- Convert mouse position to Texture position on ball (Game Development)
- set mouse position (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: The 'Migrosoft.Jet.OLEDB.4.0' provider is not registered on the local machine
- Next Thread: adding to list?



Linear Mode