纯inno脚本实现的闪屏,调用Win32 API实现,无需额外DLL,可以作为存为iss文件include来使用。
不过有一定局限性,只能使用bmp文件。
CODE
//调用方法:
//ShowSplash(bmp文件名, 宽,高, 淡入/淡出毫秒时间, 图片静止毫秒时间);
function SetLayeredWindowAttributes(hWnd: HWND; ColorRef: TColor; bAlpha:
byte; dwFlags: LongInt): boolean;
external 'SetLayeredWindowAttributes@user32 stdcall';
function SetWindowLong(hWnd : HWND; nIndex : integer; dwNewLong : Longint):
Longint;
external 'SetWindowLongA@user32 stdcall';
function GetWindowLong(hWnd : HWND; nIndex : integer): LongInt;
external 'GetWindowLongA@user32 stdcall';
const
WS_EX_LAYERED = $80000;
GWL_EXSTYLE = -20;
LWA_COLORKEY = 1;
LWA_ALPHA = 2;
FadeStep = 10;
procedure SetTransparentForm(AHandle : THandle; AValue : byte);
begin
SetWindowLong(AHandle, GWL_EXSTYLE, GetWindowLong(AHandle, GWL_EXSTYLE) or
WS_EX_LAYERED);
SetLayeredWindowAttributes(AHandle, 0, AValue, LWA_ALPHA);
end;
procedure ShowSplash(splashFileName: String; Width, Height, fadetime, stilltime: LongInt);
var
SplashForm: TForm;
SplashImage: TBitmapImage;
i, SleepSetp: LongInt;
begin
SplashForm := TForm.create(nil);
with SplashForm do
begin
Parent := nil;
BorderStyle := bsNone;
Position := poScreenCenter;
ClientWidth := Width;
ClientHeight := Height;
end;
SplashImage := TBitmapImage.Create(SplashForm);
with SplashImage do
begin
BitMap.LoadFromFile(SplashFileName);
Stretch := true;
Align := alClient;
Parent := SplashForm;
end;
with SplashForm do
begin
SetTransparentForm(SplashForm.handle, 0);
show;
Repaint;
SleepSetp := fadetime * FadeStep / 255;
for i := 1 to 255/FadeStep do
begin
SetTransparentForm(SplashForm.handle, i * FadeStep);
Sleep(SleepSetp);
end;
sleep(stilltime);
for i := 255/FadeStep downto 1 do
begin
SetTransparentForm(SplashForm.handle, i * FadeStep);
Sleep(SleepSetp);
end;
close;
release;
end;
end;
使用实例:
CODE
procedure InitializeWizard();
begin
ExtractTemporaryFile('MySplash.bmp');
ShowSplash(ExpandConstant('{tmp}\MySplash.bmp'), 240,200, 1000,3000);
end;
没有合适的资源?快使用搜索试试~ 我知道了~
inno脚本实例、安装包和插件.rar
共11个文件
dll:3个
txt:2个
gif:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 134 浏览量
2023-05-07
17:11:41
上传
评论
收藏 55.05MB RAR 举报
温馨提示
如何测试一个SQL Server ODBC驱动程序连接使用的是5。如何检测是否和哪个版本的MS Access安装。如何检测安装版本的Acrobat Reader。如何创建和修改与ADO的Access MDB。如何创建一个映射驱动器使用的网络连接对话框。启动,停止,安装,删除功能的NT服务。如何安装Windows媒体播放器9。如何防止用户选择安装空格的文件夹。Inno Setup可视化编辑。如何创建的ODBC DSN 2。如何检测IE浏览器安装的版本。如何检测安装的MDAC版本。如何检测安装的ADSI版本。
资源推荐
资源详情
资源评论
收起资源包目录
inno脚本实例、安装包和插件.rar (11个子文件)
NSISADDIN
newadvsplash.dll 9KB
mymusic.mod 50KB
BASSMOD.dll 40KB
callnsis.dll 17KB
splash.gif 10KB
背景音乐.txt 454B
闪屏.txt 2KB
splash_mp3music.zip 90KB
splash_music_example.iss 6KB
用闪屏实现安装程序正在加载.iss 704B
splash.gif 10KB
共 11 条
- 1
资源评论
HappyGirl快乐女孩
- 粉丝: 1w+
- 资源: 4160
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功