?
Solved

Open program after ShellExecute

Posted on 2011-03-25
3
Medium Priority
?
226 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 2000 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

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

765 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