修改过后的INNO中,闪屏+背景音乐+链接.
复制内容到剪贴板
代码:
[Code]
procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://www.i0595.net', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
function mciSendString(lpstrCommand, lpstrReturnString: PChar; uReturnLength: UINT; hWndCallback: HWND): Integer;
external 'mciSendStringA@winmm.dll stdcall';
procedure InitializeWizard();
var
SplashImage: TBitmapImage;
SplashForm: TForm;
SplashFileName: String;
I : Integer;
s: string;
URLLabel: TNewStaticText;
CancelButton: TButton;
begin
WizardForm.WELCOMELABEL1.Font.Color:= clRed;
WizardForm.WELCOMELABEL1.Font.Name:= '宋体';
WizardForm.WELCOMELABEL1.Font.Size:= 11;
CancelButton := WizardForm.CancelButton;
ExtractTemporaryFile(ExtractFileName(ExpandConstant('{tmp}\000.mp3')));
mciSendString(ExpandConstant('OPEN {tmp}\000.mp3 TYPE MPEGVIDEO ALIAS BGMUSIC'),s,255,0);
mciSendString(ExpandConstant('PLAY BGMUSIC REPEAT'),s,255,0);
URLLabel := TNewStaticText.Create(WizardForm);
URLLabel.Top := CancelButton.Top;
URLLabel.Left := WizardForm.Width - CancelButton.Left - CancelButton.Width;
URLLabel.Caption := '晋江生活社区';
URLLabel.Font.Color := clBlue;
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := WizardForm;
SplashFileName := ExpandConstant('{tmp}\ranbg.BMP');
ExtractTemporaryFile(ExtractFileName(SplashFileName));
SplashForm := TForm.create(nil);
with SplashForm do
begin
BorderStyle := bsNone;
Position := poScreenCenter;
ClientWidth := 354;
ClientHeight := 180;
end;
SplashImage := TBitmapImage.Create(SplashForm);
with SplashImage do
begin
Bitmap.LoadFromFile(SplashFileName);
Stretch := true;
Align := alClient;
Parent := SplashForm;
end;
with SplashForm do
begin
Show;
for I := 1 to 2 do
begin
Repaint;
Sleep(1000);
end;
Close;
Free;
end;
end;[
本帖最后由 小施 于 2006-10-12 06:16 PM 编辑 ]