本文整理自网络,侵删。
有两种方法可以确定屏幕的高度和宽度。
使用全局Screen变量uses Forms;...Screen.Height { Screen height in pixels }Screen.Width { Screen width in pixels }...使用Windows API GetSystemMetrics()函数
此功能在不使用VCL的应用程序(例如控制台应用程序)中很有用。
uses Windows;...GetSystemMetric(SM_CXSCREEN) { Screen height in pixels }GetSystemMetric(SM_CYSCREEN) { Screen width in pixels }...
相关阅读 >>
Delphi 双击listbox1内容,数据插入到memo1/synedit1鼠标指定位置
Delphi xe5 将Delphi code从winos 迁移到ios与android
更多相关阅读请进入《Delphi》频道 >>