Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

appactivate("XXXX - netscape")

Posted on 1999-01-21
3
Medium Priority
?
284 Views
Last Modified: 2010-05-03
how can i activate my netscape window with appactivate
when I don't know the window titel (XXXX).
The only thing to be sure is that it contains
"netscape".
0
Comment
Question by:qwertzuiop
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
rondeauj earned 40 total points
ID: 1469908
you could could use any of the following API's:

findwindow()
getwindow()
windowfrompoint()

then use getwindowtext and instr()
0
 

Author Comment

by:qwertzuiop
ID: 1469909
Can you give an working example to find the window:
     XXXX - Netscape

0
 
LVL 1

Expert Comment

by:rondeauj
ID: 1469910
do you know the window class?  if not let me know and I will email you program that will tell you.  The class is something that will never change. So you can find the window according to it's class.  lets say the class is "net_scape" then you would find it like this:

dim netlong as long

netlong = findwindow("NET_SCAPE",vbnullstring )

if netlong <> 0 then
     dim tempstring as string
     tempstring = getwindowtext(netlong)
     dim test as intger
     test = instr(ucase$(tempstring),"NETSCAPE")
     if test <> 0 then 'we found the window
         showwindow netlong ,vbhide
     end if
end if

there are other ways to do this but you will need a program like spy which will tell you what the windows class is and who the parent window is. This information will help you find the window during run time.  Let me know if you need more help
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question