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 解析json生成json

Delphi 利用tmemorystream对象存取缓存

Delphi winapi: setlayeredwindowattributes - 设置窗口的透明

Delphi保存网页中的图片

Delphi的tclientsocket组件和tserversocket组件(c/s)说明

Delphi 获取鼠标坐标大全方法

Delphi 6句代码实现Delphi动态调用api函数

sqlite报错database is locked的解决办法

Delphi 过滤所有空格的函数

Delphi判断mssql数据库中表格是否存在? 如何批量创建表格?

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



打赏

取消

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

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

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

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

评论

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