?? aboutu.pas
字號:
unit ABOUTU;
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls,Dialogs, XPMenu, jpeg, TFlatHintUnit;
type
TaboutF = class(TForm)
Panel1: TPanel;
ProgramIcon: TImage;
ProductName: TLabel;
Version: TLabel;
BitBtn1: TBitBtn;
Bevel1: TBevel;
lblOs: TLabel;
lblMemory: TLabel;
Others: TLabel;
Author: TLabel;
Bevel2: TBevel;
XPMenu1: TXPMenu;
Image1: TImage;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
s:string;
procedure GetOSInfo; //系統信息程序
Procedure GetMemoryInfo ; //可用資源程序
public
{ Public declarations }
end;
var
aboutF: TaboutF;
const
ver='按揭計算器測試版';
implementation
{$R *.DFM}
Procedure TaboutF.GetMemoryInfo ;//可用資源
var
MS: TMemoryStatus;
begin
MS.dwLength:=SizeOf(TMemoryStatus);
GlobalMemoryStatus(MS);
lblMemory.Caption:=lblMemory.Caption +FormatFloat('#,###" KB"',MS.dwTotalPhys div 1024);
end;
procedure TaboutF.GetOSInfo; //獲取系統信息
var
Platform: string;
BuildNumber: Integer;
begin
case Win32Platform of
VER_PLATFORM_WIN32_WINDOWS:
begin
Platform := 'Windows 95';
BuildNumber := Win32BuildNumber and $0000FFFF;
end;
VER_PLATFORM_WIN32_NT:
begin
Platform := 'Windows NT';
BuildNumber := Win32BuildNumber;
end;
else
begin
Platform := 'Windows';
BuildNumber := 0;
end;
end;
if(Win32Platform = VER_PLATFORM_WIN32_WINDOWS)
or(Win32Platform = VER_PLATFORM_WIN32_NT) then
begin
if Win32CSDVersion = ''
then lblOS.Caption := lblOS.Caption+Format('%s%s %d.%d (Build %d)',[Platform,#13,Win32MajorVersion,Win32MinorVersion,BuildNumber])
else lblOS.Caption := lblOS.Caption+Format('%s%s %d.%d (Build %d: %s)',[Platform,#13,Win32MajorVersion,Win32MinorVersion, BuildNumber,Win32CSDVersion]);
end else lblOS.Caption := lblOS.Caption+Format('%s%s %d.%d', [Platform,#13,Win32MajorVersion,Win32MinorVersion])
end;
procedure TaboutF.FormCreate(Sender: TObject);
begin
try
Caption:='關于 '+'按揭計算器';
ProgramIcon.Picture.icon:=Application.Icon;
ProductName.Caption:=ProductName.Caption+'按揭計算器';
version.Caption:=version.Caption+ver;
Author.Caption:=Author.Caption+'佳凡 ';
Others.Caption:='個人興趣編寫,使用不需經過作者同意,有什么問題可以聯系,QQ:158679138.'+
#13+#13+
'程序于WinXP+delphi6.0(xp控件)編譯通過!';
//初始化---------------------------
GetMemoryInfo;
GetOsinfo;
{***********************}
//初始化變量s...
s:='';
except
MessageBox(handle,'某些信息不能取得','提示',MB_OK);
end;
end;
procedure TaboutF.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:=caFree;
end;
procedure TaboutF.BitBtn1Click(Sender: TObject);
begin
close;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -