Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open a .TIF file and wait for closeing the application.
Message
From
21/12/2000 03:22:43
 
 
To
20/12/2000 05:39:29
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00455371
Message ID:
00455782
Views:
22
>I need to be able to open a .tif file from my VFP application. My VFP app needs to wait until the user is done with the .tif file and then continue the execution. Currently i'm using ShellExecute which opens the file as it should, but it don't allow me to wait for close. How can I do that?
>
>I've searched microsoft.com and found the file runwait.exe which holds the source code for a library called runlib.dll, unfortanly I don't have Visual C++ to compile the program. Has anyone else looked at the program?

You can implement the ShellExecuteEx() API call; it returns a usable process ID in its structure if it does not use DDE to open the OLE Server for the file. I do noy have code that I'm willing to post to do this - it is implementable using ClsHeap to handle the memory allocation for the pointers needed by the structure used by ShellExecuteEx(). Alternatively, you can find the Window your TIFF is opened in, use the hWnd to retrieve the ProcessID using GetWindowThreadProcessId() and wait for the process to terminate by getting a handle to the process using OpenProcess() and use WaitOnSingleObject() for it to terminate.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform