Solved

Task Switch to another window that is running in a Seporate process

Posted on 2004-04-01
3
426 Views
Last Modified: 2013-12-25
I am writting a VB Subroutine that will check to see if a specific program is running in the backround and "Task Switch" to that program if it is or Launch said program if it is not.  My problem is I can't get VB to "Task Switch".  I have tried using SetForegroundWindow() but I can't determine the windows Handle, even with the FindWindow().  I have contacted Tech\Development support for the program I'm trying to manipulate but they don't know the answer.  
0
Comment
Question by:Alford-Miller
3 Comments
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
How are you determining if that process is currently running or not?

Idle_Mind
0
 
LVL 6

Accepted Solution

by:
Neeraj Soni earned 500 total points
Comment Utility
Create a function

Private Sub ActivateMyApp(AppName As String)
On Error Resume Next
    AppActivate "Title of the application"
End Sub


This function activates the application with the title that is given as parameter.
The applications title bar displays the title.
The parameter should exactly match the title.

e.g. AppActivate "Untitled - Notepad"

0
 

Expert Comment

by:duanemoore
Comment Utility
Private Sub ActivateMyApp(AppName As String)
On Error Resume Next
    AppActivate AppName
End Sub

... will work a lot better.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now