tags:

views:

562

answers:

2

I am trying to use the SendKeys() command to another window with my VB6 app.

What I wanted is to click a button, and then have 10 seconds to go to the other window before the app sends some keys to that window. I got everything sorted but for some reason when I call something like this:

SendKeys ("A")

I get this error:

Run-time error '70':

Permission denied

Does anyone know a way around this? Thanks.

+2  A: 

Take a look at what Karl Peterson worked up as a fix for this under Vista:

SendInput

Jim Mack
+1 beat me to it. I think this should fix the problem
MarkJ
+1, this is what I was going to suggest.
Heather
A: 

-Windows 7 Open de Control Panel Change user account control setting Change to NEVER NOTIFY

Restart the computer

Tales Boalim

Tales