Solved

Open program after ShellExecute

Posted on 2011-03-25
3
219 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
Comment Utility
You can use setFocusAPI()

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

Author Comment

by:hrolsons
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
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…
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…

744 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

13 Experts available now in Live!

Get 1:1 Help Now