If you want to know where the cursor is positioned, do the following:
Open the api-viewer and open the database, then go to the getcursorpos
declaration, and copy it in to your code. You also need the pointapi type,
so go to the pointapi declaration and copy it in to your code.
Also declare a variable as pointapi (example: public declare pntPoint as
pointapi).
You can now read the cursorposition by using the getcursorpos command
(example: pntPoint = getcursorpos() pntpoint.x is the x position of the
cursor, and pntoint.y is the y position of the cursor).
--
Posted via CNET Help.com
http://www.help.com/
Martijn <martijn...@hotmail.com> wrote in message
news:sf89fv...@corp.supernews.com...
Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As
Long, ByVal y As Long) As Long
in your code you can then call the function using the syntax:
setcursorpos x,y
you can get a list of all winAPI functions by searching for the file
win32api.txt
Hope this helps
Mike.
Al-Asadi wrote in message ...
> I have a vb project , not an access database!
He meant use the API-viewer to view the database of API calls. It's
nothing to do with access, it just the way the api viewer holds the
information about the various API calls.
Mike Seddon <M_SE...@alliedbakeries.co.uk> wrote in message
news:8d1rle$utf$1...@newsreaderg1.core.theplanet.net...
> In a separate module declare the following call
>
> Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x
As
> Long, ByVal y As Long) As Long
>
> in your code you can then call the function using the syntax:
>
> setcursorpos x,y
>
> you can get a list of all winAPI functions by searching for the file
> win32api.txt
>
> Hope this helps
>
> Mike.
>
>
> Al-Asadi wrote in message ...
> >I have a vb project , not an access database!
> >
> >Martijn <martijn...@hotmail.com> wrote in message
> >news:sf89fv...@corp.supernews.com...
> >> Use the api-viewer (included with vb), and open the database.
Sub Form_Click ()
Dim CX, CY, Radius, Limit ' Declare variable.
ScaleMode = 3 ' Set scale to pixels.
CX = ScaleWidth / 2 ' Set X position.
CY = ScaleHeight / 2 ' Set Y position.
If CX > CY Then Limit = CY Else Limit = CX
For Radius = 0 To Limit ' Set radius.
Circle (CX, CY), Radius,RGB(Rnd * 255, Rnd * 255, Rnd * 255)
Next Radius
This is the example in Msdn, I'm sure if you thought about it for a while
you could come up with a method for plotting the x,y co-ords of the
circle to use with setcursorpos.
Hope this is of some help,
I'll have a think about it anyway if I get time today,
if I come up with something I'll mail the newsgroup.
Maybe someone else knows the formula for plotting a circle?
Mike Seddon wrote in message
<8der14$6eq$1...@newsreaderg1.core.theplanet.net>...