ISSkin Pack 3.0 (含预览程序 ISSkinViewer)
原文 http://restools.hanzify.org/article.asp?id=108
包含 250 款皮肤, 预览程序纯粹的由Inno Setup脚本写成. 足以展示Inno Setup脚本引擎的强大.
下载地址:
http://restools.hanzify.org/inno/ISSkinPack/ISSkinPack.exe
预览程序:
#error Enhanced edition ofInno Setup(restools) is required to compile this script
#endif
[Setup]
AppName=ISSkinViewer
AppVersion=1.0
SetupIconFile=IViewer.ico
DefaultDirName={pf}\ISSkinViewer
OutputBaseFilename=ISSkinViewer
OutputDir=.
[Files]
Source: ISSkin.dll; DestDir: {app}; Flags: dontcopy
[Code]
procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';
function LoadLibrary(lpLibFileName: String): THandle; external 'LoadLibraryA@kernel32.dll stdcall';
function FreeLibrary(hLibModule: THandle): Boolean; external 'FreeLibrary@kernel32.dll stdcall';
function EnumResourceNames(hModule: THandle; lpType: String; lpEnumFunc: Longword; lParam: Longint): BOOL;external 'EnumResourceNamesA@kernel32.dll stdcall';
function SetWindowText(hWnd: Longint; lpString: PChar): Longint; external 'SetWindowTextA@user32.dll';
function GetWindowLong(hWnd, nIndex: Integer): Longint; external 'GetWindowLongA@user32.dll';
procedure DeinitializeSetup();
begin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
end;
var
SkinFilePath: String;
procedure BrowserBtn_OnClick(Sender: TObject); forward;
procedure ISSkinFileCombo_OnChange(Sender: TObject); forward;
procedure ISSkinIniCombo_OnChange(Sender: TObject); forward;
procedure BlogBtn_OnClick(Sender: TObject);
var
Res: Integer;
begin
ShellExec('open', 'http://restools.hanzify.org','','', SW_SHOW, ewNoWait, Res);
end;
{ RedesignWizardFormBegin } // 不要删除这一行代码。
// 不要修改这一段代码,它是自动生成的。
var
Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Bevel2: TBevel;
Label3: TLabel;
BitmapImage1: TBitmapImage;
Label4: TLabel;
ISSkinFileCombo: TNewComboBox;
ISSkinIniCombo: TNewComboBox;
NewEdit1: TNewEdit;
NewMemo1: TNewMemo;
NewCheckBox1: TNewCheckBox;
NewRadioButton1: TNewRadioButton;
NewListBox1: TNewListBox;
Panel2: TPanel;
PasswordEdit1: TPasswordEdit;
NewCheckListBox1: TNewCheckListBox;
NewStaticText1: TNewStaticText;
FolderTreeView1: TFolderTreeView;
RichEditViewer1: TRichEditViewer;
NewProgressBar1: TNewProgressBar;
NewComboBox1: TNewComboBox;
StartMenuFolderTreeView1: TStartMenuFolderTreeView;
BrowserBtn: TNewButton;
BlogBtn: TNewButton;
procedure RedesignWizardForm;
begin
with WizardForm do
begin
Caption := 'ISSKIN 皮肤预览程序 Ver1.0';
ShowHint := True;
end;
{ Panel1 }
Panel1 := TPanel.Create(WizardForm);
with Panel1 do
begin
Name := 'Panel1';
Parent := WizardForm.WelcomePage;
Left := ScaleX(0);
Top := ScaleY(0);
Width := ScaleX(497);
Height := ScaleY(313);
BevelOuter := bvNone;
Caption := ' ';
ParentBackground := False;
end;
{ Label1 }
Label1 := TLabel.Create(WizardForm);
with Label1 do
begin
Name := 'Label1';
Parent := Panel1;
Caption := '皮肤文件:';
Transparent := False;
Left := ScaleX(16);
Top := ScaleY(8);
Width := ScaleX(51);
Height := ScaleY(13);
end;
{ Label2 }
Label2 := TLabel.Create(WizardForm);
with Label2 do
begin
Name := 'Label2';
Parent := Panel1;
Caption := '皮肤 INI 参数:';
Transparent := False;
Left := ScaleX(288);
Top := ScaleY(8);
Width := ScaleX(71);
Height := ScaleY(13);
end;
{ Bevel2 }
Bevel2 := TBevel.Create(WizardForm);
with Bevel2 do
begin
Name := 'Bevel2';
Parent := Panel1;
Left := ScaleX(7);
Top := ScaleY(72);
Width := ScaleX(482);
Height := ScaleY(229);
end;
{ Label3 }
Label3 := TLabel.Create(WizardForm);
with Label3 do
begin
Name := 'Label3';
Parent := Panel1;
Caption := 'Inno Setup 支持的控件:';
Transparent := False;
Left := ScaleX(16);
Top := ScaleY(53);
Width := ScaleX(118);
Height := ScaleY(13);
end;
{ BitmapImage1 }
BitmapImage1 := TBitmapImage.Create(WizardForm);
with BitmapImage1 do
begin
Name := 'BitmapImage1';
Parent := Panel1;
Left := ScaleX(288);
Top := ScaleY(80);
Width := ScaleX(185);
Height := ScaleY(29);
end;
{ Label4 }
Label4 := TLabel.Create(WizardForm);
with Label4 do
begin
Name := 'Label4';
Parent := Panel1;
Hint := 'TLabel';
Caption := 'Label4';
Transparent := False;
Left := ScaleX(144);
Top := ScaleY(80);
Width := ScaleX(32);
Height := ScaleY(13);
end;
{ ISSkinFileCombo }
ISSkinFileCombo := TNewComboBox.Create(WizardForm);
with ISSkinFileCombo do
begin
Name := 'ISSkinFileCombo';
Parent := Panel1;
Left := ScaleX(16);
Top := ScaleY(24);
Width := ScaleX(229);
Height := ScaleY(21);
Style := csDropDownList;
DropDownCount := 16;
end;
{ ISSkinIniCombo }
ISSkinIniCombo := TNewComboBox.Create(WizardForm);
with ISSkinIniCombo do
begin
Name := 'ISSkinIniCombo';
Parent := Panel1;
Left := ScaleX(288);
Top := ScaleY(24);
Width := ScaleX(193);
Height := ScaleY(21);
Style := csDropDownList;
end;
{ NewEdit1 }
NewEdit1 := TNewEdit.Create(WizardForm);
with NewEdit1 do
begin
Name := 'NewEdit1';
Parent := Panel1;
Left := ScaleX(16);
Top := ScaleY(104);
Width := ScaleX(105);
Height := ScaleY(21);
Hint := 'TNewEdit';
Text := 'NewEdit1';
end;
{ NewMemo1 }
NewMemo1 := TNewMemo.Create(WizardForm);
with NewMemo1 do
begin
Name := 'NewMemo1';
Parent := Panel1;
Left := ScaleX(16);
Top := ScaleY(128);
Width := ScaleX(105);
Height := ScaleY(89);
Hint := 'TNewMemo';
Lines.Text := 'NewMemo1' + #13#10 +
'Line 2' + #13#10 +
'Line 3' + #13#10 +
'Line 4' + #13#10 +
'Line 5' + #13#10 +
'Line 6' + #13#10 +
'Line 7' + #13#10 +
'Line 8' + #13#10 +
'Line 9' + #13#10 +
'Line 10' + #13#10 +
'Line 11' + #13#10 +
'Line 12' + #13#10 +
'Line 13' + #13#10 +
'';
ScrollBars := ssBoth;
end;
{ NewCheckBox1 }
NewCheckBox1 := TNewCheckBox.Create(WizardForm);
with NewCheckBox1 do
begin
Name := 'NewCheckBox1';
Parent := Panel1;
Left := ScaleX(16);
Top := ScaleY(248);
Width := ScaleX(97);
Height := ScaleY(17);
Hint := 'TNewCheckBox';
Caption := 'NewCheckBox1';
end;
{ NewRadioButton1 }
NewRadioButton1 := TNewRadioButton.Create(WizardForm);
with NewRadioButton1 do
begin
Name := 'NewRadioButton1';
Parent := Panel1;
Left := ScaleX(16);
Top := ScaleY(272);
Width := ScaleX(113);
Height := ScaleY(17);
Hint := 'TNewRadioButton';
Caption := 'NewRadioButton1';
end;
{ NewListBox1 }
NewListBox1 := TNewListBox.Create(WizardForm);
with NewListBox1 do
begin
Name := 'NewListBox1';
Parent := Panel1;
Left := ScaleX(127);
Top := ScaleY(120);
Width := ScaleX(85);
Height := ScaleY(81);
Hint := 'TNewListBox';
Items.Text := 'Line 2' + #13#10 +
'Line 3' + #13#10 +
'Line 4' + #13#10 +
'Line 5' + #13#10 +
'Line 6' + #13#10 +
'Line 7' + #13#10 +
'Line 8' + #13#10 +
'Line 9' + #13#10 +
'Line 10' + #13#10 +
'Line 11' + #13#10 +
'Line 12' + #13#10 +
'Line 13';
ItemIndex := -1;
end;
{ Panel2 }
Panel2 := TPanel.Create(WizardForm);
with Panel2 do
begin
Name := 'Panel2';
Parent := Panel1;
Left := ScaleX(127);
Top := ScaleY(224);
Width := ScaleX(85);
Height := ScaleY(41);
Hint := 'TPanel';
Caption := 'Panel2';
end;
{ PasswordEdit1 }
PasswordEdit1 := TPasswordEdit.Create(WizardForm);
with PasswordEdit1 do
begin
Name := 'PasswordEdit1';
Parent := Panel1;
Left := ScaleX(127);
Top := ScaleY(272);
Width := ScaleX(85);
Height := ScaleY(21);
Hint := 'TPasswordEdit';
Text := 'PasswordEdit1';
end;
{ NewCheckListBox1 }
NewCheckListBox1 := TNewCheckListBox.Create(WizardForm);
with NewCheckListBox1 do
begin
Name := 'NewCheckListBox1';
Parent := Panel1;
Left := ScaleX(224);
Top := ScaleY(120);
Width := ScaleX(145);
Height := ScaleY(81);
Hint := 'TNewCheckListBox';
end;
{ NewStaticText1 }
NewStaticText1 := TNewStaticText.Create(WizardForm);
with NewStaticText1 do
begin
Name := 'NewStaticText1';
Parent := Panel1;
Hint := 'TNewStaticText';
Caption := 'NewStaticText1';
Left := ScaleX(144);
Top := ScaleY(95);
Width := ScaleX(77);
Height := ScaleY(14);
end;
{ FolderTreeView1 }
FolderTreeView1 := TFolderTreeView.Create(WizardForm);
with FolderTreeView1 do
begin
Name := 'FolderTreeView1';
Parent := Panel1;
Left := ScaleX(224);
Top := ScaleY(204);
Width := ScaleX(145);
Height := ScaleY(89);
Cursor := crArrow;
Hint := 'TFolderTreeView';
end;
{ RichEditViewer1 }
RichEditViewer1 := TRichEditViewer.Create(WizardForm);
with RichEditViewer1 do
begin
Name := 'RichEditViewer1';
Parent := Panel1;
Left := ScaleX(376);
Top := ScaleY(120);
Width := ScaleX(105);
Height := ScaleY(81);
Hint := 'TRichEditViewer';
end;
{ NewProgressBar1 }
NewProgressBar1 := TNewProgressBar.Create(WizardForm);
with NewProgressBar1 do
begin
Name := 'NewProgressBar1';
Parent := Panel1;
Left := ScaleX(16);
Top := ScaleY(224);
Width := ScaleX(105);
Height := ScaleY(17);
Hint := 'TNewProgressBar';
Min := 0;
Max := 100;
Position := 70;
end;
{ NewComboBox1 }
NewComboBox1 := TNewComboBox.Create(WizardForm);
with NewComboBox1 do
begin
Name := 'NewComboBox1';
Parent := Panel1;
Left := ScaleX(16);
Top := ScaleY(80);
Width := ScaleX(105);
Height := ScaleY(21);
Hint := 'TNewComboBox';
Items.Text := 'Line 2' + #13#10 +
'Line 3' + #13#10 +
'Line 4' + #13#10 +
'Line 5' + #13#10 +
'Line 6' + #13#10 +
'Line 7' + #13#10 +
'Line 8' + #13#10 +
'Line 9' + #13#10 +
'Line 10' + #13#10 +
'Line 11' + #13#10 +
'Line 12' + #13#10 +
'Line 13';
end;
{ StartMenuFolderTreeView1 }
StartMenuFolderTreeView1 := TStartMenuFolderTreeView.Create(WizardForm);
with StartMenuFolderTreeView1 do
begin
Name := 'StartMenuFolderTreeView1';
Parent := Panel1;
Left := ScaleX(376);
Top := ScaleY(204);
Width := ScaleX(105);
Height := ScaleY(89);
Cursor := crArrow;
Hint := 'TStartMenuFolderTreeView';
end;
{ BrowserBtn }
BrowserBtn := TNewButton.Create(WizardForm);
with BrowserBtn do
begin
Name := 'BrowserBtn';
Parent := Panel1;
Left := ScaleX(248);
Top := ScaleY(22);
Width := ScaleX(35);
Height := ScaleY(25);
Caption := '目录';
end;
ISSkinFileCombo.TabOrder := 0;
ISSkinIniCombo.TabOrder := 1;
NewEdit1.TabOrder := 2;
NewMemo1.TabOrder := 3;
NewCheckBox1.TabOrder := 4;
NewRadioButton1.TabOrder := 5;
NewListBox1.TabOrder := 6;
Panel2.TabOrder := 7;
PasswordEdit1.TabOrder := 8;
NewCheckListBox1.TabOrder := 9;
NewStaticText1.TabOrder := 10;
FolderTreeView1.TabOrder := 11;
RichEditViewer1.TabOrder := 12;
NewProgressBar1.TabOrder := 13;
NewComboBox1.TabOrder := 14;
StartMenuFolderTreeView1.TabOrder := 15;
BrowserBtn.TabOrder := 16;
Panel1.TabOrder := 2;
{ BlogBtn }
BlogBtn := TNewButton.Create(WizardForm);
with BlogBtn do
begin
Name := 'BlogBtn';
Parent := WizardForm;
Left := ScaleX(20);
Top := ScaleY(327);
Width := ScaleX(107);
Height := ScaleY(23);
Hint := '访问我的 BLOG';
Caption := 'RESTOOLS'' BLOG';
end;
BlogBtn.TabOrder := 5;
{ ReservationBegin }
// 这一部分是提供给你的,你可以在这里输入一些补充代码。
NewCheckListBox1.AddCheckBox('TNewCheckListBox', '', 0, True, True, False, True, nil);
NewCheckListBox1.AddRadioButton('TNewCheckListBox', '', 1, True, True, nil);
NewCheckListBox1.AddRadioButton('TNewCheckListBox', '', 1, False, True, nil);
NewCheckListBox1.AddCheckBox('TNewCheckListBox', '', 0, True, True, False, True, nil);
BrowserBtn.OnClick := @BrowserBtn_OnClick;
ISSkinFileCombo.OnChange := @ISSkinFileCombo_OnChange;
ISSkinIniCombo.OnChange := @ISSkinIniCombo_OnChange;
BlogBtn.OnClick := @BlogBtn_OnClick;
{ ReservationEnd }
end;
// 不要修改这一段代码,它是自动生成的。
{ RedesignWizardFormEnd } // 不要删除这一行代码。
function EnumResName(hModule: THandle; lpType, lpName: String; lParam: Longint): Boolean;
begin
ISSkinIniCombo.Items.Append(lpName);
Result := True;
end;
procedure ISSkinIniCombo_OnChange(Sender: TObject);
var
SkinFile, SkinIni: String;
begin
try
SkinFile := '';
SkinIni := '';
if ISSkinFileCombo.Items[ISSkinFileCombo.ItemIndex] <> '' then
SkinFile := SkinFilePath+'\'+ISSkinFileCombo.Items[ISSkinFileCombo.ItemIndex];
if ISSkinIniCombo.Items[ISSkinIniCombo.ItemIndex] <> '' then
SkinIni := ISSkinIniCombo.Items[ISSkinIniCombo.ItemIndex];
LoadSkin(SkinFile, SkinIni);
except
end;
end;
procedure ISSkinFileCombo_OnChange(Sender: TObject);
var
hSkin: THandle;
i, DelIndex: Integer;
S, SkinFile, SkinIni: String;
begin
try
hSkin:=LoadLibrary(SkinFilePath+'\'+ISSkinFileCombo.Items[ISSkinFileCombo.ItemIndex]);
try
ISSkinIniCombo.Items.Clear;
EnumResourceNames(hSkin, 'TEXTFILE', CallbackAddr('EnumResName'), 0);
DelIndex := -1;
for i := 0 to ISSkinIniCombo.Items.Count - 1 do
begin
S := ISSkinIniCombo.Items[i];
if CompareText(S, 'THEMES_INI')=0 then
DelIndex := i;
StringChange(S, '_', '.');
ISSkinIniCombo.Items[i] := S;
end;
if DelIndex >= 0 then
ISSkinIniCombo.Items.Delete(DelIndex);
if ISSkinIniCombo.Items.Count >= 0 then
ISSkinIniCombo.ItemIndex := ISSkinIniCombo.Items.Count - 1;
finally
FreeLibrary(hSkin);
end;
SkinFile := '';
SkinIni := '';
if ISSkinFileCombo.Items[ISSkinFileCombo.ItemIndex] <> '' then
SkinFile := SkinFilePath+'\'+ISSkinFileCombo.Items[ISSkinFileCombo.ItemIndex];
if ISSkinIniCombo.Items[ISSkinIniCombo.ItemIndex] <> '' then
SkinIni := ISSkinIniCombo.Items[ISSkinIniCombo.ItemIndex];
LoadSkin(SkinFile, SkinIni);
except
end;
end;
procedure FindSkinFile();
var
FindRec: TFindRec;
begin
ISSkinFileCombo.Items.Clear;
if FindFirst(SkinFilePath+'\*.cjstyles', FindRec) then begin
try
repeat
if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then
ISSkinFileCombo.Items.Append(FindRec.Name);
until not FindNext(FindRec);
finally
FindClose(FindRec);
end;
end;
end;
procedure BrowserBtn_OnClick(Sender: TObject);
begin
if BrowseForFolder('请选择 ISSkin 皮肤所在路径:', SkinFilePath, False) then
begin
FindSkinFile();
UnloadSkin;
end;
end;
function InitializeSetup(): Boolean;
begin
if SkinFilePath='' then
SkinFilePath := ExtractFileDir(ExpandConstant('{srcexe}'))+'\Styles';
LoadSkin('', '');
Result := True;
end;
procedure InitializeWizard();
begin
RedesignWizardForm;
FindSkinFile();
ISSkinFileCombo.Sorted := True;
end;
Procedure SetAppTitle(Value: String);
var
n: HWND;
begin
n:=GetWindowLong(MainForm.Handle, -8);
if n <> 0 then SetWindowText(n, PChar(Value));
end;
procedure CurPageChanged(CurPageID: Integer);
begin
WizardForm.NextButton.Hide;
WizardForm.CancelButton.Caption := '关闭';
SetAppTitle('ISSKIN 皮肤预览程序');
end;
ISSkin Pack 3.0 (含预览程序 ISSkinViewer)的更多相关文章
- HarmonyOS 3.0.0开发者预览版全新发布
2021年10月22日在华为开发者大会HDC.Together 2021 主题演讲上,我们发布了HarmonyOS 3.0.0开发者预览版,主要内容包括:Harmony设计系统.ArkUI 3.0.A ...
- C# 6.0 功能预览 (二)
在Language Feature Status上面看到,其实更新的并不是特别多,为了不会误导看了C# 6.0 功能预览 (一)的园友,现在把官方的更新列表拿了过来,供大家参考 Roslyn 编译平台 ...
- C# 6.0 功能预览
C# 6.0 功能预览 (一) 一.索引的成员和元素初始化 1.1 原始初始化集合 Dictionary 1.2 键值初始化集合 Dictionary 1.3 运算符 $ 初始化集合 Dictiona ...
- Spark3.0 preview预览版尝试GPU调用(本地模式不支持GPU)
Spark3.0 preview预览版可以下载使用,地址:https://archive.apache.org/dist/spark/spark-3.0.0-preview/,pom.xml也可以进行 ...
- Kafka Eagle V2.0.0新版预览
1.概述 Kafka Eagle是一款用于管理Kafka的监控系统,且完全开源.当前Kafka Eagle发布了2.0.0版本.今天笔者就为大家来介绍一下2.0.0更新了哪些功能. 官网地址:http ...
- alluxio2.0特性-预览
项目地址 https://github.com/Alluxio/alluxio/tree/branch-2.0-preview 2.0版本-构思和设计 支持超大规模数据工作负载 Alluxio作为计算 ...
- C# 6.0 功能预览 (一)
一.索引的成员和元素初始化 1.1 原始初始化集合 Dictionary 1.2 键值初始化集合 Dictionary 1.3 运算符 $ 初始化集合 Dictionary 二.自动属性的初始化 一不 ...
- Underscore.js (1.7.0)-函数预览
集合(Collections)(25) - each - map - reduce - reduceRight - find - filter - where - findWhere - reject ...
- C# 8.0 预览特性
初试C# 8.0 Visual Studio 2019的第一个预览版(使用Visual Studio 2019提高每个开发人员的工作效率)和.NET Core 3.0(宣布.NET Core 3预览1 ...
随机推荐
- JS编码解码详解
今天在整理 js编码解码方法时,在网上搜资料,发现一篇文章讲的不错,讲解的非常简单明了,于是乎就想转载过来,却发现无法转载到博客园,最后只能卑鄙的摘抄过来.js编码解码就是将一些对URL和数据库敏感的 ...
- BZOJ 2878 迷失游乐园
http://www.lydsy.com/JudgeOnline/problem.php?id=2878 题意:n个点的图,保证图联通,有n-1或者n条边,求从任意一个点出发,不经过相同点,最终无路可 ...
- 【Xamarin挖墙脚系列:代码手写UI,xib和StoryBoard间的博弈,以及Interface Builder的一些小技巧(转)】
正愁如何选择构建项目中的视图呢,现在官方推荐画板 Storybord...但是好像 xib貌似更胜一筹.以前的老棒子总喜欢装吊,用代码写....用代码堆一个HTML页面不知道你们尝试过没有.等页面做出 ...
- 【转】Android 平台下使用 i2c-tools
原文网址:http://my.oschina.net/luoly/blog/368881 Android 平台下使用 i2c-tools Andorid 开发板为 Freescale imx6 的 S ...
- MongoDb C/java driver
1,在linux下安装客户端连接windows下 的MongoDBServer.
- android中通过自定义xml实现你需要的shape效果 xml属性配置
在Android开发过程中,经常需要改变控件的默认样式, 那么通常会使用多个图片来解决.不过这种方式可能需要多个图片,比如一个按钮,需要点击时的式样图片,默认的式样图片,然后在写一个selector的 ...
- 给Visual Studio更替皮肤和背景图
给Visual Studio更换皮肤和背景图 1.先安装更换皮肤的插件 VS菜单栏里面找到:工具>扩展和更新>联机>搜索: Theme Editor 下载并安装: 安装后先不着 ...
- 卡特兰数 Catalan数 ( ACM 数论 组合 )
卡特兰数 Catalan数 ( ACM 数论 组合 ) Posted on 2010-08-07 21:51 MiYu 阅读(13170) 评论(1) 编辑 收藏 引用 所属分类: ACM ( 数论 ...
- 在Swift中使用遗留的C API
Swift的类型系统的设计目的在于简化我们的生活,为此它强制用户遵守严格的代码规范来达到这一点.毫无疑问这是一件大好事,它鼓励程序员们编写 更好更正确的代码.然而,当Swift与历史遗留的代码库.特别 ...
- 【巧妙算法系列】【UVA 11384】 Help is needed for Dexter 正整数序列
Help is needed for Dexter Time Limit: 3 Second Dexter is tired of Dee Dee. So he decided to keep Dee ...