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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application forms, access by form caption.

Status
Not open for further replies.

TrystUK

Programmer
Oct 21, 2002
10
GB
I have an application that I want to send keystrokes to. However, I need to know what application to return focus to and identify the form within the application is currently active, identifying it by the caption to determine if it is a simple Return keystroke or a more complex entry.

I enter a set of numbers on the first form, If they don't match, an error form (3 button MsgBox) is generated and requires only a Return keystroke to take it back to the entry form. If it matches, another form is generated also with an OK button.

My dilemma is that I don't know the form name so I can only identify the form by it's caption and I don't want to send a return keystroke to the one that tells me it was correct or it defeats the object.

Can anyone give me some tips?

Thanks
Tryst

My Idea of an OS is one that operates the system not a self contained package of every piece of software ever invented.
 

EnumWindows, EnumChildWindows, SendMessage, GetWindowText API's should do the trick for you.

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top