delphi 横竖屏代码控制


本文整理自网络,侵删。

 
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.

相关阅读 >>

Delphi webbrowser1 execwb 复制 新建 打开

Delphixe jpg图片压缩

Delphi idhttp 设置cookie 和访问后读取cookie 值

Delphi 打开android应用信息

Delphi seek函数中参数说明

Delphi stringgrid如何清空

Delphi fmx检测屏幕旋转

Delphi dbgrid上设置选择项

Delphi实现webservice带身份认证的数据传输

Delphi开机启动项管理源码

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...