delphi xe 应用程序横竖屏设置


本文整理自网络,侵删。

 
应用程序禁止竖屏代码
 Application.Initialize;  
  
  //禁止竖屏,只允许横屏 
  Application.FormFactor.Orientations := [TFormOrientation.soLandscape, TFormOrientation.soInvertedLandscape];  
  //禁止横屏,只允许竖屏
  //Application.FormFactor.Orientations := [TFormOrientation.soPortrait, TFormOrientation.soInvertedPortrait];
  
  Application.CreateForm(TForm1, Form1);  
  Application.Run; 

2、工程中设置

在工程管理视图中鼠标右键,在弹出的菜单中选择Options…,在左边的列表中选中Application,在右边面板区域中的Orientation页,勾选Custom orientation,你就可以勾选它下面的四个选项(Portrait,Upside down,Landscape home right,Landscape home left),其中Landscape home right,Landscape home left表示横屏,Portrait,Upside down表示竖屏。

 

当然,它其实也是在工程代码中加上前面我们讲的那句代码。

相关阅读 >>

winapi 字符及字符串函数(7): ischarlower - 是否是个小写字母

Delphi 链接文件名合并

Delphi inttohex 查看字符的十六进制值

Delphi2010下安装控件Delphi

Delphi判断系统是否安装tcp/ip协议

Delphi动态创建一个鼠标指针图案

Delphi 程序退出时删除自身

Delphi 获取系统进程列表和进程所在路径

Delphi文本加密解密

Delphi中判断是否是64位操作系统

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



打赏

取消

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

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

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

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

评论

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