我琢磨了下,照我写下面可以
//关键
uses KsThemeThemes, tethemestd, tethemehighlight, tethemeofficexp,
TeThemeLuna, TeThemeLines, TeThemeFlat, tethememetalluna, tethemekde,
tethemecoolflat //关键
procedure TfrmMain.initskin;
var
opini: Tinifile;
pifu: integer;
begin
opini := Tinifile.create(GetCurrentDir + '/tywdoption.ini');
try
pifu := opini.readinteger('skinoption', 'skin', 0);
finally
opini.Free;
end;
initskinmenu;
case pifu of //
0:
begin
initskinmenu;
CustomItem18.Checked := true;
NgThemeEngine1.ChangeTheme(TTeThemeHighlight);
end;
1:
begin
initskinmenu;
CustomItem15.Checked := true;
NgThemeEngine1.ChangeTheme(TTeThemeFlat);
end;
2:
begin
initskinmenu;
//CustomItem17.Checked := true;
NgThemeEngine1.ChangeTheme(TTeThemeHighlight);
end;
3:
begin
initskinmenu;
CustomItem4.Checked := true;
NgThemeEngine1.ChangeTheme(TTeThemeLuna);
end;
4:
begin
initskinmenu;
CustomItem6.Checked := true;
NgThemeEngine1.ChangeTheme(TTeThemeMetalLuna);
end;
5:
begin
initskinmenu;
CustomItem16.Checked := true;
NgThemeEngine1.ChangeTheme(TTeThemeKDE);
end;
6:
begin
initskinmenu;
CustomItem7.Checked := true;
NgThemeEngine1.ChangeTheme(TTeThemeCoolFlat);
end;
7:
begin
initskinmenu;
CustomItem16.Checked := true;
NgThemeEngine1.ChangeTheme(TTeThemeOfficeXP);
end;
8:
begin
initskinmenu;
CustomItem21.Checked := true;
NgThemeEngine1.ChangeTheme(TTeTheme);
end;
9:
begin
initskinmenu;
CustomItem19.Checked := true;
NgThemeEngine1.ChangeTheme(TTeThemeStd);
end;
end; // case
end;