本文整理自网络,侵删。
unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type TForm1 = class(TForm) Label1: TLabel; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);beginForm1.Label1.Caption:='桌面分辨率是:'+IntToStr(Screen.Width)+'*'+IntToStr(Screen.Height)+'像素';end;
end.
相关阅读 >>
Delphi winapi: writeprivateprofilestring、getprivateprofilestring - 简单读写 ini 文件
Delphi 的webbrowser如何全选并复制浏览器上的文字
Delphi winapi: getparent - 获取指定窗口的父窗口句柄
更多相关阅读请进入《Delphi》频道 >>