-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathUnit1.pas
40 lines (30 loc) · 789 Bytes
/
Unit1.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
RadioGroup1: TRadioGroup;
procedure Button1Click(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
end;
var
Form1: TForm1;
implementation
uses WindowsDarkMode;
{$R *.dfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
if DarkModeIsEnabled then
ShowMessage('Dark mode is enabled.')
else
ShowMessage('Dark mode is NOT enabled.');
end;
procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
SetSpecificThemeMode(RadioGroup1.ItemIndex = 0, 'Carbon', 'Windows10');
end;
end.