Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am currently using the SendKeys as below:(VB.Net)
SendKeys.Send("^{DOWN}") 'Scroll down
SendKeys.SendWait("-1") 'Wait until sendkey has completed

The problem that I have is,while my software project is running (scrolling through the web page drop down list) I am unable to use any other app on my desktop.

Example:
When I use Excel or notepad,it will keep entering -1-1-1-1-1 continuously, until I click on my projects form.
This is driving me mad,and would love to find a way to scroll through each item in a web page drop down list while using another app at the same time.

What I have tried:

I have tried to prevent the cursor from leaving the form,but people that use my software,dont like to be restricted in this way.
Posted
Updated 27-Nov-18 8:11am

1 solution

That's the problem with SendKeys - it only works with the active window.

If you want to automate a web browser, then you're going to need to rewrite your code to use something like Selenium:
Selenium - Web Browser Automation[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900