Delphi XE2 两句代码实在随机换肤

1、先在Project--> Operation --->  Application ---> Appearance,把所有的皮肤都勾选了。

2、Uses  Vcl.Themes 单元;

3、填写代码

var li_Count: Integer;
begin
  Randomize;
  li_Count := High(TStyleManager.StyleNames);
  TStyleManager.SetStyle(TStyleManager.StyleNames[Random(li_Count)]);
end;

posted @ 2012-05-14 16:33  极度生存  阅读(249)  评论(0编辑  收藏  举报