By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,776 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

Ghost keys

P: 31
When I got SendKeys function on VB6, can I put it send the keys if the window isn't open, like I watch someone else sites while my macro says something on other site? If yes can you send the function code?
Sep 14 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 5K+
P: 8,434
Sorry, but can you try to explain in more detail what you mean?
Sep 14 '07 #2

VBPhilly
P: 95
When I got SendKeys function on VB6, can I put it send the keys if the window isn't open, like I watch someone else sites while my macro says something on other site? If yes can you send the function code?
Translation attempt

Can I SendKeys to a form while the form does not have focus? If yes, can you show me an code example?

or,

Can I sendkeys while I am doing something else?
Sep 14 '07 #3

Expert 5K+
P: 8,434
Translation attempt

Can I SendKeys to a form while the form does not have focus? If yes, can you show me an code example?

or,

Can I sendkeys while I am doing something else?
Sounds like a reasonable attempt at a translation. A lot of the time, I just don't have the time (or inclination) to try and work out what such a brief question means. We try to get people to post detailed, clear questions. This is not only for our own benefit, but that of anyone who comes searching for answers in the future.

Anyway, if it's the former question, then I would say "no". SendKeys does not send them to anywhere in particular. It simply says to Windows "this key was pressed". What happens then is effectively what would have happened if you did actually press the key. In other words, whoever has the focus will receive it.

To send things to a particular application/window, I think you need to use the Windows SendMessage API functions.
Sep 15 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.