Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mouse API calls for movement and change of pointer

0 views
Skip to first unread message

diggz

unread,
Sep 29, 1999, 3:00:00 AM9/29/99
to
I have for a long time wanted to create a little app that sort of changes
the mousepointer/cursor into a car-like thingy. What it's all about is that
when you move the mouse to the left, the cursor will begin to point left,
after some steps of movement it points directly to the left. This is the
case for all directions. If the mouse is situated pointing straight to the
left, and the mouse is moved straight to the right, the cursor will change
gradually - as movement continue - and will - like you'd turn round a car -
eventually point straight to the right.

The first try on this project was done in VC++, but it was far too difficult
to program, even though many of the same API calls are used. I was very mych
helped here, but there were bugs in the code, and I was unnable to correct
it due to bad VC++ skills. Now, I'm into VB, and has started the project
again.

Bottom line: What API calls are necessary to perform these steps, and how do
i get the differences in mouse-positions (x,y) when using a timer? is there
an API-call for mousemove? how do i use it?

regards

di...@online.no


Stracca

unread,
Sep 29, 1999, 3:00:00 AM9/29/99
to
To Obtain the cursor position:
=====================
Public Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos"
(lpPoint As POINTAPI) As Long

Public Type POINTAPI
x As Long
y As Long
End Type
=====================


To change the cursor position:
=====================
Public Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos"
(ByVal x As Long, ByVal y As Long) As Long
=====================

--
Ciaps
Stracca

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cerca le risposte alle tue domande sul Sito Comune del
newsgroup it.comp.lang.visual-basic: http://www.murialdo.it/it_lang_vb
Magari prima leggi l'Help in linea!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diggz <di...@online.no> wrote in message
JotI3.929$ZF4....@news1.online.no...

0 new messages