Victor_Dobrov
Огромнейшее СПАСИБОЧКИ!!!
Добавлено:
Victor_Dobrov
[Setup]
AppName=VideoOnBackground
AppVerName=VideoOnBackground
CreateAppDir=false
[Code]
var BackgroundForm: TForm;
function ShowWindow(hWnd, nCmdShow: LongWord): LongWord; external 'ShowWindow@user32.dll stdcall';
function mciSendString(lpstrCommand: String; lpstrReturnString, uReturnLength, hwndCallback: Integer): Integer; external 'mciSendStringA@winmm.dll stdcall';
procedure BackgroundOnActivate(Sender: TObject); Begin if WizardForm.Visible then WizardForm.Show End;
Procedure InitializeWizard; var errorCode: Integer; MyVideoFile: String;
Begin
MyVideoFile:= 'Video.AVI' // ваш фильм, клип, слайдшоу и т.п.
BackgroundForm:= TForm.Create(nil)
if not FileExists(MyVideoFile) then Exit;
BackgroundForm.BorderStyle:= bsNone;
BackgroundForm.OnActivate:= @BackgroundOnActivate;
ShowWindow(BackgroundForm.Handle, sw_ShowMaximized) // фоновое окно на полный экран
mciSendString('open '+ MyVideoFile +' alias AVIFile parent '+ IntToStr(BackgroundForm.Handle) +' style child',0,0,0)
mciSendString('put AVIFile window at '+ IntToStr(BackgroundForm.Left) +' '+ IntToStr(BackgroundForm.Top) +' '+ IntToStr(BackgroundForm.Width) +' '+ IntToStr(BackgroundForm.Height),0,0,0)
mciSendString('play AVIFile repeat',0,0,0) // повторять бесконечно
End;
Procedure DeinitializeSetup;
Begin
mciSendString('Close AVIFile',0,0,0) { закрыть AVI-файл}
BackgroundForm.Free
End;
Вопросик: Video.AVI ложится в ту же папку что и данный скрипт?
Огромнейшее СПАСИБОЧКИ!!!
Добавлено:
Victor_Dobrov
[Setup]
AppName=VideoOnBackground
AppVerName=VideoOnBackground
CreateAppDir=false
[Code]
var BackgroundForm: TForm;
function ShowWindow(hWnd, nCmdShow: LongWord): LongWord; external 'ShowWindow@user32.dll stdcall';
function mciSendString(lpstrCommand: String; lpstrReturnString, uReturnLength, hwndCallback: Integer): Integer; external 'mciSendStringA@winmm.dll stdcall';
procedure BackgroundOnActivate(Sender: TObject); Begin if WizardForm.Visible then WizardForm.Show End;
Procedure InitializeWizard; var errorCode: Integer; MyVideoFile: String;
Begin
MyVideoFile:= 'Video.AVI' // ваш фильм, клип, слайдшоу и т.п.
BackgroundForm:= TForm.Create(nil)
if not FileExists(MyVideoFile) then Exit;
BackgroundForm.BorderStyle:= bsNone;
BackgroundForm.OnActivate:= @BackgroundOnActivate;
ShowWindow(BackgroundForm.Handle, sw_ShowMaximized) // фоновое окно на полный экран
mciSendString('open '+ MyVideoFile +' alias AVIFile parent '+ IntToStr(BackgroundForm.Handle) +' style child',0,0,0)
mciSendString('put AVIFile window at '+ IntToStr(BackgroundForm.Left) +' '+ IntToStr(BackgroundForm.Top) +' '+ IntToStr(BackgroundForm.Width) +' '+ IntToStr(BackgroundForm.Height),0,0,0)
mciSendString('play AVIFile repeat',0,0,0) // повторять бесконечно
End;
Procedure DeinitializeSetup;
Begin
mciSendString('Close AVIFile',0,0,0) { закрыть AVI-файл}
BackgroundForm.Free
End;
Вопросик: Video.AVI ложится в ту же папку что и данный скрипт?