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 unigui 控件动画

Delphi 保存hotkey1.hotkey值

Delphi xp 之后, Delphi 动注册表不方便了...逼出来一个办法:

Delphi idhttp实现地址自动转向

Delphi xe 7 mediaplayer 在安卓里放不出声音

Delphi 编写服务程序的几点总结

Delphi trunc转换函数

Delphi 2010 fastmm 内存泄露使用方法

Delphi 中文字符串函数问题rightstr

获取 ip138 ip 地址

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



打赏

取消

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

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

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

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

评论

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