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

预览程序:


引用来自  ISSkinViewer.iss  引用来自 ISSkinViewer.iss
#ifndef IS_ENHANCED
  #error Enhanced edition of Inno 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;
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
AlphaControls最新版本皮肤制作工具 AlphaControls是一个具有新特性的标准,将原来的皮肤控件的集合,以增强程序接口,并添加行为,共同控制,并与一些新技术的使用。 一些特点: 专业外观的应用程序! 超过80更换皮肤控件和无形的标准组件+更换皮肤德尔福控制和很多第三方控件 所有元素的控制与绘制 阿尔法通道 使用(控制可能是阿尔法混合,可以有现实边框,阴影或其它精细和独特的效果) 无闪烁 图形功能是提供 实时的 ,因此,效果总是用锐利的色彩方案,并 移动 和 调整大小 在运行时间 每个控制 支持 TsHintManager做出提示,显示Alpha混合,用HTML的格式,你可以从许多方面选择显示 位置和渲染新增Caption属性 鼠标事件将提供极大的possiblities 去皮形式和菜单。 全空间数据基础设施和支持MDI窗体 皮肤支持所有常见的Windows对话框和消息 内置的PNG格式的支持,TsAlphaImageList组件非常方便工作 最简单,功能强大的皮肤引擎,支持 内部和外部的皮肤 ,一个控制类型可以在某些类型的皮肤。 所有图纸(除模式)支持α-口罩 皮肤控制的应用 从一个点 (TsSkinManager组件) 组件的使用没有皮肤的可能性。 一种是标准控制支持(XP主题使用是可能的) 原 快速 算法的图纸,许多图形和其他包中的库函数 在设计时设计的IDE 准备使用的皮肤 外观发展与扩大的可能性和自己。 免费皮肤编辑工具可用。 动画效果 在某些控件和窗体 去皮Windows外壳控制 Billenium影响 全力支持 没有任何DLL或其他文件须为EXE部署 更改当前皮肤运行时的色调和饱和度 全部标准的 Windows帮助 文件中描述的所有属性,事件和对象的方法和相关的组件 可能性在单EXE的文件中嵌入的点击几下鼠标外观 一个额外的有用的和惊人的功能和很多可能性,其中名单不断增加 随着AlphaControls,使用新的现代设计方法提高你的应用程序接口,使更具吸引力... 同时增加快乐和有趣的最终用户。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值