Jump to content


Photo

Visual Basic Mouse manipulation


  • Please log in to reply
3 replies to this topic

#1 Nightscream

Nightscream

    Young Padawan

  • Members
  • Pip
  • 100 posts
  • Gender:Male
  • Location:Belgium

Posted 03 October 2007 - 04:53 PM

How can I manipulate the mouse?
Eumh let the mouse click on a coordinate. I know you can but just don't know the command..

#2 U1

U1

    Young Padawan

  • Members
  • Pip
  • 245 posts

Posted 13 October 2007 - 11:16 AM

Have you tried SetCursorPos and Mouse_Event API's?

#3 Nightscream

Nightscream

    Young Padawan

  • Members
  • Pip
  • 100 posts
  • Gender:Male
  • Location:Belgium

Posted 27 October 2007 - 02:13 PM

nope going to try this :D

#4 Nightscream

Nightscream

    Young Padawan

  • Members
  • Pip
  • 100 posts
  • Gender:Male
  • Location:Belgium

Posted 29 October 2007 - 12:10 PM

ok I found the way to manipulate it but now I got another problem
I'm using the GetCursorPos function
But when i want to see the x and y coords i get something very strange.
x = 1155346203274
y = 0
Now i want to know how can i get this fixed? :s

Structure PointApi
	Dim x As Long
	Dim y As Long
End Structure

Declare Function GetCursorPos Lib "User32" ( _
		ByRef lpPoint As PointApi) As Long

Private Sub btnPosition_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPosition.Click
Dim pt32 As PointApi

GetCursorPos(pt32)

txtX.Text = pt32.x
txtY.Text = pt32.y





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users