урок на делфи 14 - Прозрачное окно


задание на delphi. делаем главную форму прозрачной.


unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
if form1.TransparentColor=true then
begin
Form1.BorderStyle:=bsSingle;
form1.TransparentColor:=false;
end
else
begin
Form1.BorderStyle:=bsNone;
form1.TransparentColor:=true;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Close;
end;
end.



Скачать