| | |
Simulate Mouse Click
![]() |
•
•
Join Date: Mar 2007
Posts: 6
Reputation:
Solved Threads: 0
I am working on a project where I need to open a .pps file using Visual Basic 6 (which I have done already). I need to change the slide transition according to input obtained from a serial port that will keep changing during the execution of the VB project. Please assist me on this.
As the mouse click will proceed to the next slide in the slideshow, I would like to know if there is a way to simulate this mouse click and hence indirectly alter the slide transition timing. Please help me.
As the mouse click will proceed to the next slide in the slideshow, I would like to know if there is a way to simulate this mouse click and hence indirectly alter the slide transition timing. Please help me.
•
•
Join Date: Mar 2007
Posts: 6
Reputation:
Solved Threads: 0
Im unsure if theres an easier way to do this but you could do this pretty simple with an API call
simply changing the values of x and y will simulate a click.
Hope this helps if you want more help with how the API works run a google search on it
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Declare Auto Function mouse_event Lib "user32.dll" (ByVal dwflags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal dwData As Integer, ByVal dwExtraInfo As Integer) As Integer Const MOUSEEVENTF_LEFTDOWN as Integer = 2 Const MOUSEEVENTF_LEFTUP as Integer = 4 Const MOUSEEVENTF_RIGHTDOWN as Integer = 8 Const MOUSEEVENTF_RIGHTUP as Integer = 16Public Shared Sub MouseClick() { Dim x As Integer = 100 Dim y As Integer = 100; mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0) mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0) }
simply changing the values of x and y will simulate a click.
Hope this helps if you want more help with how the API works run a google search on it
![]() |
Similar Threads
- Simulate Mouse Move (C++)
- How to store data in data grid to database by single mouse click in Asp.net (ASP.NET)
- Mouse Right Click Menu (Windows NT / 2000 / XP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Open Programs In VB Program
- Next Thread: vb and ppt help please urgent
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





