Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i prevent my form from getting focus? and more...

Status
Not open for further replies.

aliinal

Technical User
Jun 26, 2001
104
TR
I'm using sendkey to send keystrokes to other applications.
i use several command buttons for this which are located on form1.

When i click on any command button it activates the application by
AppActivate AppName, True

and then send keystrokes by sendkey.

This works fine but everytime i click a command button on my form, my form get focus and then other applicatin get i tback. (My form is topmost).

Because of this, every time i click a command button, windows seems to be flashing.
To prevent this i want to learn how can i prevent my form getting focus.
is it possible???

and another question...
how can i get all aplications' name that are running? in to an array or listbox etc?.

Thanks a lot
 
I think your problem may be the KeyPreview Property on a form. It may not make much of a difference but its worth a try.

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top