Log in

View Full Version : Hidding External apps like dvd2avi and vobsub


GZZ
21st June 2004, 23:56
I´m running dvd2avi though an application of mine, but is it possible to totally hide the window (dvd2avi and vobsub window), so it don't popup a mio times if you are running them on many small files ??


I know there are no Hidding commandline to these application, but does anyone know if windows have a function to hide it ????


GZZ

Guest
22nd June 2004, 12:17
When you open the application, open it in minimized state. You'll still get a taskbar entry, but it's not as irritating.

GZZ
22nd June 2004, 16:30
how do I run it minimized ??

I use this code to Execute DVD2AVI:



Function CreateD2Vfile(Input, Output: String): Integer;
var
zAppName: array[0..512] of char;
zCurDir: array[0..255] of char;
WorkDir: string;
StartupInfo: TStartupInfo;
ProcessInfo: TProcessInformation;
begin
StrPCopy(zAppName, (ExtractFilePath(Application.ExeName) + 'dvd2avi\DVD2AVIdg.exe -FO=0 -CS=2 -YR=1 -OM=0 -DRC=0 -DSD=0 -DSA=0 -DF=0 -IF=[' + Input + '] -OF=[' + Output + '] -exit'));
GetDir(0, WorkDir);
StrPCopy(zCurDir, WorkDir);
FillChar(StartupInfo, Sizeof(StartupInfo), #0);
StartupInfo.cb := Sizeof(StartupInfo);
StartupInfo.dwFlags := STARTF_USESHOWWINDOW;
StartupInfo.wShowWindow := SW_HIDE;
if not CreateProcess(nil,
zAppName, { pointer to command line string }
nil, { pointer to process security attributes }
nil, { pointer to thread security attributes }
False, { handle inheritance flag }
CREATE_NEW_CONSOLE or { creation flags }
NORMAL_PRIORITY_CLASS,
nil, { pointer to new environment block }
nil, { pointer to current directory name }
StartupInfo, { pointer to STARTUPINFO }
ProcessInfo) then { pointer to PROCESS_INF }
Result := -1
else
begin
WaitforSingleObject(ProcessInfo.hProcess, INFINITE);
Result := 0;
CloseHandle(ProcessInfo.hProcess);
CloseHandle(ProcessInfo.hThread);
end;
end;




I get the Information window as you have at the right side of DVD2AVI window, but its VERY irritating...How do you mean I can minimize it, please advice ??

mpucoder
23rd June 2004, 14:05
In STARTUPINFO set dwFlags to STARTF_USESHOWWINDOW (ored with any other flags you use) and wShowWindow to SW_MINIMIZE

GZZ
24th June 2004, 11:50
Thanks alot, it worked really well. :D

GZZ