Solved

Open program after ShellExecute

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Getting warning: You are about to delete 1 row(s) 9 43
VBA: Select SQL query based on a config Sheet v2 11 38
VBA Shell can't Find Word document 11 76
VB6 ListBox Question 4 33
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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 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…

920 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

17 Experts available now in Live!

Get 1:1 Help Now