unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, jpeg, ExtCtrls, StdCtrls, GlowLabel, WindowsVersionInfo;
type
TForm1 =
class(TForm)
Image1: TImage;
Image2: TImage;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
GlowLabel1: TGlowLabel;
GlowLabel2: TGlowLabel;
GlowLabel3: TGlowLabel;
GlowLabel4: TGlowLabel;
GlowLabel5: TGlowLabel;
GlowLabel6: TGlowLabel;
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
procedure WindowsVersion;
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.WindowsVersion;
var winInfo : TOSVersionInfo;
begin
winInfo.dwOSVersionInfoSize := sizeof (OSVERSIONINFO);
GetVersionEx (winInfo);
if winInfo.dwPlatformId = VER_PLATFORM_WIN32_NT
then
begin
if ((winInfo.dwMajorVersion = 6)
and (winInfo.dwMinorVersion = 0))
then
begin
// Windows-Vista wird verwendet... Vista-Effekte werden aktiviert
//Form1:
Form1.GlassFrame.Enabled := True;
Form1.Image1.Hide;
Form1.SpeedButton1.Font.Color := clBlack;
Form1.SpeedButton2.Font.Color := clBlack;
Form1.GlowLabel1.Font.Color := clBlack;
Form1.GlowLabel2.Font.Color := clBlack;
Form1.GlowLabel3.Font.Color := clBlack;
Form1.GlowLabel4.Font.Color := clBlack;
Form1.GlowLabel5.Font.Color := clBlack;
Form1.GlowLabel6.Font.Color := clBlack;
//Form2;
Form2.GlassFrame.Enabled := True;
Form2.Image1.Hide;
Form2.Image2.Hide;
Form2.Bevel1.Height := 230;
end
else
begin
// Windows-XP wird verwendet... Vista-Effekte werden deaktiviert
ShowMessage ('
Sie benutzen leider kein Windows Vista, daher werden die Glas-Effekte deaktiviert.');
//Form1:
Form1.GlassFrame.Enabled := False;
Form1.Image1.Show;
Form1.SpeedButton1.Font.Color := clWhite;
Form1.SpeedButton2.Font.Color := clWhite;
Form1.GlowLabel1.Font.Color := clWhite;
Form1.GlowLabel2.Font.Color := clWhite;
Form1.GlowLabel3.Font.Color := clWhite;
Form1.GlowLabel4.Font.Color := clWhite;
Form1.GlowLabel5.Font.Color := clWhite;
Form1.GlowLabel6.Font.Color := clWhite;
//Form2;
Form2.GlassFrame.Enabled := False;
Form2.Image1.Show;
Form2.Image2.Show;
Form2.Bevel1.Height := 0;
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
DoubleBuffered := True;
WindowsVersion;
end;
.
.
end.