RSS订阅 | 匿名投稿
您的位置:网站首页 > FMX > 正文

delphi 横竖屏代码控制

作者:admin 来源: 日期:2018/1/20 10:06:26 人气: 标签:

unit uMainForm;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
  FMX.Controls.Presentation;

type
  TForm1 = class(TForm)
    Button2: TButton;
    DefaultStyleBook: TStyleBook;
    Button4: TButton;
    ToolBar1: TToolBar;
    Label1: TLabel;
    procedure Button4Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.Button2Click(Sender: TObject);
begin
Application.FormFactor.Orientations := [TFormOrientation.Portrait];
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
Application.FormFactor.Orientations := [TFormOrientation.Landscape];
end;

end.

读完这篇文章后,您心情如何?
0
0
0
0
0
0
0
0
本文网址:
下一篇:没有资料