Solved

appactivate("XXXX - netscape")

Posted on 1999-01-21
3
273 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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

729 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