🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.basic.visual
5 messages
5 total messages Started by Lonnie Boudreaux Thu, 07 Oct 1999 00:00
Moving the mouse.
#149
Author: Lonnie Boudreaux
Date: Thu, 07 Oct 1999 00:00
5 lines
1060 bytes
Does anyone know how to make a program move a mouse on the screen,
hopefully predetermined places.  Like sending keystrokes maybe.

Thanks
Lonnie
Re: Moving the mouse.
#150
Author: Stevendv
Date: Fri, 08 Oct 1999 00:00
9 lines
1312 bytes
try using sendinput

Lonnie Boudreaux wrote:

> Does anyone know how to make a program move a mouse on the screen,
> hopefully predetermined places.  Like sending keystrokes maybe.
>
> Thanks
> Lonnie
Re: Moving the mouse.
#151
Author: Bobby NesSmith
Date: Fri, 08 Oct 1999 00:00
21 lines
1827 bytes
Try using the SetPos API.
Add the following into a module.
---Cut Here---
Public Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos"
(ByVal x As Long, ByVal y As Long) As Long
---End Cut---

Example: SetCursorPos 50,100

~Reboot~
3:23 A.M.
October 8, 1999

------Original Message------
Lonnie Boudreaux <nospam@no.spam.nsc> wrote in message
news:MPG.1266fb96fd33d66989680@news1.lig.bellsouth.net...
> Does anyone know how to make a program move a mouse on the screen,
> hopefully predetermined places.  Like sending keystrokes maybe.
>
> Thanks
> Lonnie
Re: Moving the mouse.
#152
Author: Qixel ( Former Name: Q-Spawn )
Date: Fri, 08 Oct 1999 00:00
42 lines
2289 bytes
Hi,

here's and Example of using the API Call SetCursorPos

Public Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos"
(ByVal x As Long, ByVal y As Long) As Long

Function MouseHere(MouseX AS Integer, MouseY AS Integer) AS Boolean
    'Get the Screen Resolution...   ScreenX by ScreenY in Pixels
    ScreenX = Screen.Width / Screen.TwipsPerPixelX
    ScreenY = Screen.Height / Screen.TwipsPerPixelY

    'Check to see if the New Co-ords are with in the Screen Resolution
    IF MouseX > ScreenX THEN MouseX = ScreenX
    IF MouseX < 0 THEN MouseX = 0

    IF MouseY > ScreenY THEN MouseY = ScreenY
    IF MouseY < 0 THEN MouseY = 0

    'Set the Mouse Cursor at the New Position
    SetCursorPos MouseX, MouseY

    'Set the Function to True because the the Whole Subroutine ran
    MouseHere = TRUE
End Function

Sub Form_Load()
    MsgBox MouseHere(100, 100), vbOKOnly, "MouseHere Return Value"
End Sub


: )
any Questions ask me : )


Lonnie Boudreaux wrote:

> Does anyone know how to make a program move a mouse on the screen,
> hopefully predetermined places.  Like sending keystrokes maybe.
>
> Thanks
> Lonnie
Re: Moving the mouse.
#156
Author: SHLOMO RABANI
Date: Sun, 10 Oct 1999 00:00
7 lines
1037 bytes
Does any one know how to subclass a form to read
the mouse wheel?

shlomo raabani

rabani@shani.net
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads