Solved

Open program after ShellExecute

Posted on 2011-03-25
3
225 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

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 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