
GetModuleUsage 32-bit API declare?
On Tue, 21 Apr 1998 15:15:06 +0100, Ian Addinsell
Quote:
>I have the same requirement as you and have tried the examples offered
>and some in the KB and have not found a complete solution.
>I want to run the shelled task hidden (or at a pinch minimised).
>I can either
>Wait for a task to finish using CreateProcessA and WaitforSingleObject
>but wShowWindow element of STARTUPINFO doesn't seem to do anything
>Or use Shell, OpenProcess and WaitforSingleObject and get it hidden but
>Wait.. doesn't.
>Any ideas ?
>Thanks
>Ian
I just use the Shell method right now. Since my "hidden"
task is just a program to insert records into an Oracle
database using ODBC, I made a formless executable (no VB
form at all.. just a compiled module with a "sub Main" to
start it). Not a problem to hide something that you can't
show. Since it's just a big passthrough SQL query I can't
really check it's status anyway.. I just have to wait for it
to finish. If anyone has a method for a % complete when
doing ODBC passthough SQL inserts, I'd appreciate it,
though!
If it's your own program, you could always do a "if
me.windowstate <> vbMinimized then me.windowstate =
vbMinimized" in the form's Activate event, I guess.
Otherwise, have you tried the shell with a
vbMinimizedNoFocus [ex. ProcessId = Shell(PrgToExecute,
vbMinimizedNoFocus)]? That might work. Of course if they
click to maximize it's game over - the form pops up & haunts
you.
Other than that, I'm out of ideas - unless you want to get
really {*filter*} with some API's to hunt down the offending
app and monitor it's status.
I hope that helped a little.
Blake
Please remove the 454 from my email address if responding
by email (SPAM protection):