Solved

appactivate("XXXX - netscape")

Posted on 1999-01-21
3
257 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
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
rondeauj earned 20 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

821 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