unit main;
interface
uses
Unit2,System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Ani,
FMX.StdCtrls, FMX.Controls.Presentation, FMX.ListBox, FMX.Layouts, FMX.Objects;
type
TForm2 = class(TForm)
ListBox1: TListBox;
ListBoxItem1: TListBoxItem;
ListBoxItem2: TListBoxItem;
ListBoxItem3: TListBoxItem;
ListBoxGroupHeader1: TListBoxGroupHeader;
Panel1: TPanel;
ToolBar1: TToolBar;
SpeedButton1: TSpeedButton;
Circle1: TCircle;
AnimationD: TFloatAnimation;
Label2: TLabel;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
Image1: TImage;
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton3Click(Sender: TObject);
private
public
end;
var
Form2: TForm2;
implementation
{$R *.fmx}
{$R *.LgXhdpiPh.fmx ANDROID}
{$R *.Windows.fmx MSWINDOWS}
procedure TForm2.SpeedButton1Click(Sender: TObject);
var
ControlX: single;
begin
ControlX := Self.ClientWidth - 60;
if (Panel1.Position.X = ControlX) then
begin
AnimationD.StartValue:= ControlX;
AnimationD.StopValue:= 0;
end
else begin
AnimationD.StartValue := 0;
AnimationD.StopValue := ControlX;
end;
AnimationD.Start;
end;
procedure TForm2.SpeedButton3Click(Sender: TObject);
var
ControlX: single;
begin
form3.Show;
end;
end.
----------Unit2 (Formulario 2) se llama 3 porque he creado bastantes y no me ha dado ninguno
unit Unit2;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm3 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
public
end;
var
Form3: TForm3;
implementation
uses main;
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject);
begin
form2.Show;
end;
end.