• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

How can i force my app to lose focus?

I'm using VB 6.0.
In my app, I want to send a character to another application. I know how to stuff the buffer, but I need to lose focus 1st, so the other app gets it.

When the button is selected, I want to:
- pause for a bit
- Lose focus (to pass control to whatever app was opened previously)
- Put the char in the buffer, so the other app will read it
- keep my app running, but w/o focus.
0
jpalumbos
Asked:
jpalumbos
  • 2
1 Solution
 
lunchbyteCommented:
I do not know how to set focus to other application without bring that application to front and cover yours.

Sometime I want none of the textboxes and buttons to have the focus so I set the focus to the form. Since form does not display anything that indicate it has focus except for the blue title bar on top, this will keep it top order if that is what you need.

Form.setfocus

0
 
jpalumbosAuthor Commented:
I might not have stated my original problem correctly:

I need my app to lose focus (or minimize), and the app that's currently 2nd in the order to get focus.

This can (usually) be done manually by typing <Alt>-Tab. Is there a way to do this in my VB program?
0
 
jpalumbosAuthor Commented:
0
 
GranModCommented:
Closed, 200 points refunded.

GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now