starting an app in background ...

I need to open Adobe Reader in background (not visible) when I start my program... someone have an idea ?
[105 byte] By [trasher] at [2007-11-17 17:03:54]
# 1 Re: starting an app in background ...
Have a look at http://www.dev-archive.com/forum/showthread.php?s=&threadid=17088&highlight=createprocess
DSJ at 2007-11-10 0:22:54 >
# 2 Re: starting an app in background ...
I looked at the example, that's good but how can I get the handle of the owner's window ??

Dim tSEINFO as SHELLEXECUTEINFO

With tSEINFO
.cbSize = len(tSEINFO)
.fMask = SEE_MASK_NOCLOSEPROCESS
.hwnd = hwnd ????
.lpVerb = "OPEN"
.lpFile = "C:\YourRTFFile.rtf"
.lpParameters = ""
.lpDirectory = ""
.nShow = 1
End With
trasher at 2007-11-10 0:23:54 >
# 3 Re: starting an app in background ...
ok it works.
it opens acrobat reader with the path I found in the registry key.
But the app is visible... I want it to be invisible...

thanks for your help!
trasher at 2007-11-10 0:24:59 >
# 4 Re: starting an app in background ...
In the StartupInfo Structure, set dwFlags member to START_F_USESHOWINOW and the wShowWindow member to SW_HIDE.

Private Const STARTF_USESHOWWINDOW = &H1
Private Const SW_HIDE = 0
DSJ at 2007-11-10 0:25:53 >
# 5 Re: starting an app in background ...
Yeah .. I realized that the value of .nshow was set to 1 and not 0...

sorry for posting this question.. this was obvious...
but thanks for the api infos :)
trasher at 2007-11-10 0:27:01 >
# 6 Re: starting an app in background ...
ok, I looked at some infos.. but I just can't see how the startupinfo struct is associated with the shellexecute API ?
isn't with createProcess function or something like this ?

thanks for any help :)
trasher at 2007-11-10 0:28:00 >