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

See if window is open on the hand of the window text

P: 21
Hello,

How can I see if a window is open when I only have the window text.

Greetings
Jan 12 '08 #1
Share this Question
Share on Google+
3 Replies


Expert 5K+
P: 8,434
How can I see if a window is open when I only have the window text.
Can you explain in a little more detail what you mean? And what version of VB you're using?

For example, if by "window text" you mean the title of a window displayed by another application, then there are various API calls you can do to interact with it. In fact, I think the AppActivate statement might even give you what you want.
Jan 13 '08 #2

P: 21
I'm using VB6. I used the API functionGetWindowText to have the text in the blue window bar.

Now I want to put the window with that text in the foreground, but the API Function SetForeGroundWindow uses the long value of a window. I can get this with GetWindowLong.

So a solution for my problem would be, getting the window long and window text, and check if the window text is the same as my text, and when it is, remember the long value and then do SetForeGroundWindow with that long value.

But is this possible in a shorter way?
Jan 14 '08 #3

Expert 5K+
P: 8,434
Have you tried AppActivate?
Jan 15 '08 #4

Post your reply

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