Solved

Open program after ShellExecute

Posted on 2011-03-25
3
223 Views
Last Modified: 2012-05-11
How would I set focus to the new application after I issue:

Call ShellExecute(hWnd, "Open", stored_file, "", App.path, 1)
0
Comment
Question by:hrolsons
[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 48

Expert Comment

by:jpaulino
ID: 35219571
You can use setFocusAPI()

Example: http://www.codeguru.com/forum/showthread.php?t=25949
0
 

Author Comment

by:hrolsons
ID: 35219590
jpaulino, the link you provided doesn't really explain seFocusAPI(), I will look around.
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 35219635
Have you checked in the end? You just need to use SetFocusAPI (hnd), in that example, in a timer for a short delay.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String manipulation in Visual Basic 7 82
Using "ScreenUpdating" 6 83
Access query that references subform 5 48
MS SQL Update query with connected table data 3 59
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

735 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