Link to home
Start Free TrialLog in
Avatar of qwertzuiop
qwertzuiop

asked on

appactivate("XXXX - netscape")

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".
ASKER CERTIFIED SOLUTION
Avatar of rondeauj
rondeauj

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of qwertzuiop
qwertzuiop

ASKER

Can you give an working example to find the window:
     XXXX - Netscape

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