Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding an app's window with ShellExecute()
Message
 
To
31/12/2001 06:59:52
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00599228
Message ID:
00599381
Views:
17
>George
>
>The application under development requires a generic means of printing files and ShellExecute() provides this, assuming the file type has an associated Windows application.
>
>With regard to Word, an instance of Word appears on screen followed by its print dialog.
>
>The print dialog is OK but the instance of Word may cause concern to the uninitiated. COM may be the only answer as far as Word is concerned, but I am hoping there may be a simpler workaround and if Word behaves like that I can only assume Excel may be similar.
>
Dennis,

If there are a number of different types (associated with different applications) of files, then I'd say ShellExecute() or the Shell (from the WSH) object's Run method would be the way to go. You might try SW_SHOWMINNOACTIVE (7) as the window state parameter. I can only guess what's happening with Word. As I recall, the sort of behavior you describe doesn't seem to occur with other applications such as Notepad. The parameter above, should cause the application to start minimized, but inactive and your application will retain the focus.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform