本文整理自网络,侵删。
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);beginApplication.FormFactor.Orientations := [TFormOrientation.Portrait];end;
procedure TForm1.Button4Click(Sender: TObject);beginApplication.FormFactor.Orientations := [TFormOrientation.Landscape];end;
end.
相关阅读 >>
Delphi 中让嵌入窗体的 webbrowser 控件无边框
更多相关阅读请进入《Delphi》频道 >>