?? about_unit.pas
字號:
unit About_Unit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, ExtCtrls, Buttons;
type
TfrmAbout = class(TForm)
Panel1: TPanel;
Copyright: TLabel;
OS: TLabel;
Label2: TLabel;
PhysMem: TLabel;
Bevel1: TBevel;
Shape1: TShape;
Label1: TLabel;
Label3: TLabel;
Label4: TLabel;
Image1: TImage;
BitBtn1: TBitBtn;
Label5: TLabel;
procedure FormCreate(Sender: TObject);
procedure CopyrightClick(Sender: TObject);
procedure CopyrightMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
private
procedure GetOSInfo;
procedure InitializeCaptions;
public
{ Public declarations }
end;
var
frmAbout: TfrmAbout;
implementation
uses ShellAPI;
{$R *.dfm}
procedure TfrmAbout.FormCreate(Sender: TObject);
begin
InitializeCaptions;
end;
procedure TfrmAbout.CopyrightClick(Sender: TObject);
begin
shellexecute(handle,nil,'http://www.northwain.com.cn',nil,nil,sw_shownormal);
end;
procedure TfrmAbout.CopyrightMouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
Shape1.Visible:=true;
end;
procedure TfrmAbout.Panel1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
Shape1.Visible:=false;
end;
procedure TfrmAbout.GetOSInfo;
var
Platform: string;
BuildNumber: Integer;
begin
case Win32Platform of
VER_PLATFORM_WIN32_WINDOWS:
begin
Platform := 'Windows 98';
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
OS.Caption := Format('%s %d.%d (Build %d)', [Platform, Win32MajorVersion,
Win32MinorVersion, BuildNumber])
else
OS.Caption := Format('%s %d.%d (Build %d: %s)', [Platform, Win32MajorVersion,
Win32MinorVersion, BuildNumber, Win32CSDVersion]);
end
else
OS.Caption := Format('%s %d.%d', [Platform, Win32MajorVersion,
Win32MinorVersion])
end;
procedure TfrmAbout.InitializeCaptions;
var
MS: TMemoryStatus;
begin
GetOSInfo;
MS.dwLength := SizeOf(TMemoryStatus);
GlobalMemoryStatus(MS);
PhysMem.Caption := FormatFloat('#,###" KB"', MS.dwTotalPhys div 1024);
end;
end.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -