?? frmabout.pas
字號:
unit FRMABOUT;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, NEOFORM, ComCtrls, MenuBar, ToolWin, ExtCtrls, StdCtrls,myself,
DsFancyButton;
const
WS_EX_LAYERED = $80000;
AC_SRC_OVER = $0;
AC_SRC_ALPHA = $1;
AC_SRC_NO_PREMULT_ALPHA = $1;
AC_SRC_NO_ALPHA = $2;
AC_DST_NO_PREMULT_ALPHA = $10;
AC_DST_NO_ALPHA = $20;
LWA_COLORKEY = $1;
LWA_ALPHA = $2;
ULW_COLORKEY = $1;
ULW_ALPHA = $2;
ULW_OPAQUE = $4;
//新增加的常量定義
type
TFrm_about = class(TzypNeoForm)
Panel1: TPanel;
ProgramIcon: TImage;
lblOs: TLabel;
lblMemory: TLabel;
ProductName: TLabel;
Version: TLabel;
Copyright: TLabel;
others: TLabel;
Bevel1: TBevel;
OKBtn: TDsFancyButton;
Author: TPaintBox;
procedure FormCreate(Sender: TObject);
procedure ProgramIconClick(Sender: TObject);
procedure OKBtnClick(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
s:string;
Procedure Delay(x,y:word);//延時程序
procedure GetOSInfo; //系統(tǒng)信息程序
Procedure GetMemoryInfo ; //可用資源程序
{ Private declarations }
public
{ Public declarations }
end;
var
Frm_about: TFrm_about;
implementation
{$R *.dfm}
Procedure TFrm_about.GetMemoryInfo ;//可用資源
var
MS: TMemoryStatus;
begin
MS.dwLength := SizeOf(TMemoryStatus);
GlobalMemoryStatus(MS);
lblMemory.Caption :=lblMemory.Caption +FormatFloat('#,###" KB"', MS.dwTotalPhys div 1024);
end;
procedure TFrm_about.GetOSInfo; //獲取系統(tǒng)信息
var
Platform: string;
BuildNumber: Integer;
begin
case Win32Platform of
VER_PLATFORM_WIN32_WINDOWS:
begin
if (Win32MajorVersion=4) and (Win32MinorVersion=10) then
Platform :='Windows 98'
else
Platform := 'Windows 95';
BuildNumber := Win32BuildNumber and $0000FFFF;
end;
VER_PLATFORM_WIN32_NT:
begin
if (Win32MajorVersion=5) and (Win32MinorVersion=0) then
Platform := 'Windows 2000'
else if (Win32MajorVersion=5) and (Win32MinorVersion=1) then
Platform := 'Windows XP'
else if (Win32MajorVersion=4) and (Win32MinorVersion=0) then
Platform := 'Windows NT 4.0'
else
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 版本 %d.%d (內部版本 %d)', [Platform, Win32MajorVersion,
Win32MinorVersion, BuildNumber])
else
lblOS.Caption := lblOS.Caption+Format('%s 版本 %d.%d (內部版本 %d: %s)', [Platform, Win32MajorVersion,
Win32MinorVersion, BuildNumber, Win32CSDVersion]);
end
else
lblOS.Caption := lblOS.Caption+Format('%s %d.%d', [Platform, Win32MajorVersion,
Win32MinorVersion])
end;
procedure TFrm_about.Delay(x,y:word);
var timeout:TDateTime;
begin
//該成為WINDOWS APP啟動時間這個函數(shù)來做!
timeout:=now+encodeTime(0,x div 60,x mod 60,y);
While now<timeout do
Application.ProcessMessages;
end;
procedure TFrm_about.FormCreate(Sender: TObject);
begin
inherited;
try
self.Caption :=application.Title + ' - ';
self.Caption :=self.caption+'關于本軟件';
ProgramIcon.Picture.icon:=Application.Icon; //圖標
ProductName.Caption:=ProductName.Caption+Application.Title;//產品名稱
version.Caption:=version.Caption+Getfilever; //版本
Copyright.Caption:=Copyright.Caption+'ThinkNET Studio'+#13+' (1999-2002)';
others.Caption:='警 告:本系統(tǒng)為共享軟件,你可以隨意的拷貝、使用;但是,'+#13
+' 任何未經授權的非法修改都將被禁止!否則,系統(tǒng)在運'+#13
+' 行過程中出現(xiàn)的任何問題,作者將不負任何連帶責任!'+#13
+' 并且,本公司及作者保留該程序的最終版權。';
////初始化---------------------------
GetMemoryInfo;
GetOsinfo;
//初始化變量s...
s:='';
except
MessageBox(handle,'在提取系統(tǒng)信息時某些信息不能取得','提示',MB_OK);
end;
end;
procedure TFrm_about.ProgramIconClick(Sender: TObject);
var i,fontheight:Byte;
begin
inherited;
try
panel1.Hide;
fontheight:=author.Canvas.TextHeight('A');
for i:=0 to 150+fontHeight*8 do
if not panel1.Visible then //在此處添加說明
with author.Canvas do
begin
textout(25,100-i,'感謝您使用【'+Application.Title+'】系統(tǒng)!');
textout(25,100+fontheight-i,'');
textout(25,100+fontheight*2-i,'系統(tǒng)說明——');
textout(25,100+fontheight*3-i,'軟件作者:肖 揚');
textout(25,100+fontheight*4-i,'開發(fā)前端:Borland Delphi 6.0');
textout(25,100+fontheight*5-i,'數(shù)據(jù)處理:Borland Paradox 7.0');
textout(25,100+fontheight*6-i,'開發(fā)時間:2002年3月');
textout(25,100+fontheight*7-i,'');
textout(25,100+fontheight*8-i,'技術支持——');
textout(25,100+fontheight*9-i,'熱線支持:(0519)8129888 肖揚');
textout(25,100+fontheight*10-i,'手機支持:013861269933 肖揚');
textout(25,100+fontheight*11-i,'電子郵件:thinknet@china.com');
textout(25,100+fontheight*12-i,'網上服務:WWW.DTSKING.COM');
textout(25,100+fontheight*13-i,'');
textout(25,100+fontheight*14-i,'ThinkNET Studio ');
textout(25,100+fontheight*15-i,'最后編譯日期:'+formatdatetime('yyyy-mm-dd',now));
Delay(0,50);
end;
finally
panel1.Show;
self.Refresh;
end;
end;
procedure TFrm_about.OKBtnClick(Sender: TObject);
begin
inherited;
panel1.Show ;
self.Close ;
end;
procedure TFrm_about.FormKeyPress(Sender: TObject; var Key: Char);
begin
inherited;
s:=s+key; //用戶輸入"Author"這顯示
if StrUpper(Pchar(s))='A' then
begin
ProgramIconclick(sender);
s:=''
end;
end;
procedure TFrm_about.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
application.ProcessMessages ;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -