⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 howto_aboutme.htm

📁 对于学习很有帮助
💻 HTM
字号:
<html><head><title>如何给自己的程序制作彩旦</title><meta http-equiv=Content-Type content=text/html; charset=gb2312><meta name=GENERATOR content=Microsoft FrontPage 3.0><meta name=Microsoft Border content=none></head><body style=font-family: 宋体, serif; font-size: 9pt><center><b><span style=font-family: 宋体, serif; font-size: 12pt>如何给自己的程序制作复活节彩蛋</span></b></center><center><span style=font-family: 宋体, serif; font-size: 9pt>西安 &nbsp;&nbsp;&nbsp;&nbsp; <a href=mailto:delphifan@990.net>梁&nbsp; 明</a></span></center><hr><ul> <li><span style=font-family: 宋体, serif; font-size: 9pt>自己的程序完成了,见到大部分程序都有他们的复活节彩蛋,心里好羡慕!当时也想为自己做点广告,于是就有下面的代码(Hello,可别为我做广告噢!)。 <br> </span></li> <li><span style=font-family: 宋体, serif; font-size: 9pt><b>下面是源代码:</b></span></li> <li><span style=font-family: 宋体, serif; font-size: 9pt>//主窗体<br> unit Unit1;<br> <br> interface<br> <br> uses<br> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br> StdCtrls, ComCtrls;<br> <br> type<br> TForm1 = class(TForm)<br> Button1: TButton;<br> StatusBar1: TStatusBar;<br> procedure Button1Click(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br> <br> var<br> Form1: TForm1;<br> <br> implementation<br> <br> uses About;<br> <br> {$R *.DFM}<br> <br> procedure TForm1.Button1Click(Sender: TObject);<br> begin<br> aboutbox.showmodal;<br> end;<br> <br> end.<br> </span></li> <li><span style=font-family: 宋体, serif; font-size: 9pt>//About窗体<br> {=============通用About程序源代码=============}<br> { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> {&nbsp;&nbsp;&nbsp; _/\_/\__ Copyright by 梁 明 __/\_/\_&nbsp;&nbsp;&nbsp;&nbsp; }<br> { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1998-01-02 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> {=============================================}<br> unit About;<br> <br> interface<br> <br> uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,<br> Buttons, ExtCtrls,Dialogs;<br> <br> type<br> TAboutBox = class(TForm)<br> Panel1: TPanel;<br> ProgramIcon: TImage;<br> ProductName: TLabel;<br> Version: TLabel;<br> Copyright: TLabel;<br> others: TLabel;<br> Author: TPaintBox;<br> BitBtn1: TBitBtn;<br> Bevel1: TBevel;<br> lblOs: TLabel;<br> lblMemory: TLabel;<br> procedure FormCreate(Sender: TObject);<br> procedure ProgramIconClick(Sender: TObject);<br> procedure OKButtonClick(Sender: TObject);<br> procedure FormKeyPress(Sender: TObject; var Key: Char);<br> private<br> { Private declarations }<br> s:string;<br> Procedure Delay(x,y:word);//延时程序<br> procedure GetOSInfo; //系统信息程序<br> Procedure GetMemoryInfo ; //可用资源程序<br> public<br> { Public declarations }<br> end;<br> <br> var<br> AboutBox: TAboutBox;<br> <br> implementation<br> <br> {$R *.DFM}<br> Procedure TAboutBox.GetMemoryInfo ;//可用资源<br> var<br> MS: TMemoryStatus;<br> begin<br> &nbsp;&nbsp;&nbsp; MS.dwLength := SizeOf(TMemoryStatus);<br> &nbsp;&nbsp;&nbsp; GlobalMemoryStatus(MS);<br> lblMemory.Caption :=lblMemory.Caption +FormatFloat('#,###&quot; KB&quot;', MS.dwTotalPhys div 1024);<br> end;<br> <br> procedure TAboutBox.GetOSInfo; //获取系统信息<br> var<br> Platform: string;<br> BuildNumber: Integer;<br> begin<br> case Win32Platform of<br> VER_PLATFORM_WIN32_WINDOWS:<br> begin<br> Platform := 'Windows 95';<br> BuildNumber := Win32BuildNumber and $0000FFFF;<br> end;<br> VER_PLATFORM_WIN32_NT:<br> begin<br> Platform := 'Windows NT';<br> BuildNumber := Win32BuildNumber;<br> end;<br> else<br> begin<br> Platform := 'Windows';<br> BuildNumber := 0;<br> end;<br> end;<br> if (Win32Platform = VER_PLATFORM_WIN32_WINDOWS) or<br> (Win32Platform = VER_PLATFORM_WIN32_NT) then<br> begin<br> if Win32CSDVersion = '' then<br> lblOS.Caption := lblOS.Caption+Format('%s %d.%d (Build %d)', [Platform, Win32MajorVersion,<br> Win32MinorVersion, BuildNumber])<br> else<br> lblOS.Caption := lblOS.Caption+Format('%s %d.%d (Build %d: %s)', [Platform, Win32MajorVersion,<br> Win32MinorVersion, BuildNumber, Win32CSDVersion]);<br> end<br> else<br> lblOS.Caption := lblOS.Caption+Format('%s %d.%d', [Platform, Win32MajorVersion,<br> Win32MinorVersion])<br> end;<br> <br> procedure Taboutbox.Delay(x,y:word);<br> var timeout:TDateTime;<br> begin<br> //该成为WINDOWS APP启动时间这个函数来做!<br> timeout:=now+encodeTime(0,x div 60,x mod 60,y);<br> While now&lt;timeout do<br> Application.ProcessMessages;<br> end;<br> <br> <br> procedure TAboutBox.FormCreate(Sender: TObject);<br> begin<br> {**********************************************}<br> try<br> Caption:='关于'+application.Title; //标题<br> ProgramIcon.Picture.icon:=Application.Icon; //图标<br> ProductName.Caption:=ProductName.Caption+Application.Title;//产品名称<br> version.Caption:=version.Caption+'1.00'; //版本<br> Copyright.Caption:=Copyright.Caption+'中国 ● 西安 梁明工作室 ';<br> others.Caption:='警 告:未经允许,任何个人、单位不得以任何方式'+#13#10+<br> '非法拷贝、盗用!否则,系统在运行过程中出现的任何'+#13#10+<br> '问题作者将不负任何连带责任!';<br> ////初始化---------------------------<br> GetMemoryInfo;<br> GetOsinfo;<br> {***********************}<br> //初始化变量s...<br> s:='';<br> except<br> MessageBox(handle,'某些信息不能取得','提示',MB_OK);<br> end;<br> end;<br> <br> procedure TAboutBox.ProgramIconClick(Sender: TObject);<br> var i,fontheight:Byte;<br> begin<br> try<br> panel1.Hide;<br> fontheight:=author.Canvas.TextHeight('A');<br> for i:=0 to 150+fontHeight*8 do<br> if not panel1.Visible then //在此处添加说明<br> with author.Canvas do<br> begin<br> textout(25,100-i,'感谢您选用&quot;'+Application.Title+'&quot;系统!');<br> textout(25,100+fontheight-i,'');<br> textout(25,100+fontheight*2-i,'系统说明——');<br> textout(25,100+fontheight*3-i,'软件作者:梁 明');<br> textout(25,100+fontheight*4-i,'开发前端:Borland Delphi 4.0');<br> textout(25,100+fontheight*5-i,'数据处理:Borland Paradox 7.0');<br> textout(25,100+fontheight*6-i,'开发周期:99/02/10-99/02/13');<br> textout(25,100+fontheight*7-i,'');<br> textout(25,100+fontheight*8-i,'技术支持——');<br> textout(25,100+fontheight*9-i,'热线支持:(029)7295153 梁先生');<br> textout(25,100+fontheight*10-i,'方便传呼:126-5030345 梁先生');<br> textout(25,100+fontheight*11-i,'电子邮件:delphifan@990.net');<br> textout(25,100+fontheight*12-i,'网上服务:liangming.163.net');<br> textout(25,100+fontheight*13-i,'');<br> textout(25,100+fontheight*14-i,' 梁 明 于梁明工作室 ');<br> textout(25,100+fontheight*15-i,' 1999/02/10');<br> Delay(0,20);<br> end;<br> finally<br> panel1.Show;<br> Aboutbox.Refresh;<br> end;<br> end;<br> <br> procedure TAboutBox.OKButtonClick(Sender: TObject);<br> begin<br> panel1.Show;<br> Aboutbox.Refresh;<br> close;<br> end;<br> <br> procedure TAboutBox.FormKeyPress(Sender: TObject; var Key: Char);<br> begin<br> s:=s+key; //用户输入&quot;Author&quot;这显示<br> if StrUpper(Pchar(s))='AUTHOR' then<br> begin<br> ProgramIconclick(sender);<br> s:=''<br> end;<br> end;<br> <br> end.<br> </span></li></ul><ul> <li><span style=font-family: 宋体, serif; font-size: 9pt><b>窗体As text代码</b></span></li> <li><span style=font-family: 宋体, serif; font-size: 9pt>//主窗体<br> object Form1: TForm1<br> Left = 195<br> Top = 103<br> Width = 324<br> Height = 186<br> Caption = '演示--&gt;梁明'<br> Color = clBtnFace<br> Font.Charset = GB2312_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = '宋体'<br> Font.Style = []<br> OldCreateOrder = False<br> PixelsPerInch = 96<br> TextHeight = 12<br> object Button1: TButton<br> Left = 192<br> Top = 48<br> Width = 75<br> Height = 25<br> Hint = '显示关于对话框'<br> Caption = '关于...'<br> ParentShowHint = False<br> ShowHint = True<br> TabOrder = 0<br> OnClick = Button1Click<br> end<br> object StatusBar1: TStatusBar<br> Left = 0<br> Top = 140<br> Width = 316<br> Height = 19<br> AutoHint = True<br> Panels = &lt;<br> item<br> Width = 50<br> end&gt;<br> SimplePanel = False<br> end<br> end</span></li></ul><ul> <li><span style=font-family: 宋体, serif; font-size: 9pt>//About窗体<br> object AboutBox: TAboutBox<br> Left = 410<br> Top = 92<br> BorderStyle = bsDialog<br> ClientHeight = 213<br> ClientWidth = 362<br> Color = clBtnFace<br> Font.Charset = GB2312_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = '宋体'<br> Font.Style = []<br> Icon.Data = {<br> 0000010001002020100000000000E80200001600000028000000200000004000<br> 0000010004000000000080020000000000000000000000000000000000000000<br> 000000008000008000000080800080000000800080008080000080808000C0C0<br> C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000<br> 0000000000000000000000000000000000000000000000000000000000000000<br> 0000000000000000000000000000000000000000000000000000000000000000<br> 0000000000000330000000000000000000000033303303303300000000000000<br> 0003303330333003003300000000000000033003330330002333000000000000<br> 0030000033003033333000000000000033333330000003330003330000000803<br> 33333333333333300233330000000F033333333333333302333BB03000004F83<br> 33333333333333333BB003BB00004FF3333333333333B33BB0033BBB00004FF3<br> 33333333B3BB3BB0033BBBB000004FF83B333B3B3B3BBBB03BBBBB0300F04FFF<br> 33B3B3B3BBBBBBBBBBBB00330FF04FFF8B3B3333BBBBBBBBBB0033330FF044FF<br> F8BBB03033BBBBB330333330FFF444FFF8BB0BB3003B330003333330FF44444F<br> F88B3BBB300000033333B33FFF44444FFF3BB0BBB3000333B33BB38FF4444444<br> FF003B0BB333333BBBBBB3FFF44444444FF00030BBBBBBBBBBBBBBFF44444444<br> 0000000303BBB3300000BFF444444400000000000000000000000FF444440000<br> 0000000000000000000000444444000000000000000000000000000044440000<br> 0000000000000000000000000444000000000000000000000000000000040000<br> 000000000000000000000000000000000000000000000000000000000000FFFF<br> FFFFFFFFFFFFFFFF1FFFFF8003FFFC0000FFF800007FF800007FE000003F0000<br> 001F0000001F0000000F00000007000000070000000000000000000000000000<br> 00000000000000000000000000000000000000000000000000000000000000C0<br> 00000FE01F003FFFFF80FFFFFFC0FFFFFFF0FFFFFFF8FFFFFFFEFFFFFFFF}<br> KeyPreview = True<br> OldCreateOrder = True<br> Position = poScreenCenter<br> OnCreate = FormCreate<br> OnKeyPress = FormKeyPress<br> PixelsPerInch = 96<br> TextHeight = 12<br> object Author: TPaintBox<br> Left = 0<br> Top = 8<br> Width = 364<br> Height = 159<br> Font.Charset = GB2312_CHARSET<br> Font.Color = clBlue<br> Font.Height = -12<br> Font.Name = '宋体'<br> Font.Style = []<br> ParentFont = False<br> end<br> object Panel1: TPanel<br> Left = 8<br> Top = 7<br> Width = 347<br> Height = 170<br> BevelOuter = bvNone<br> ParentColor = True<br> TabOrder = 0<br> object ProgramIcon: TImage<br> Left = 13<br> Top = 7<br> Width = 32<br> Height = 32<br> AutoSize = True<br> OnClick = ProgramIconClick<br> IsControl = True<br> end<br> object ProductName: TLabel<br> Left = 60<br> Top = 9<br> Width = 60<br> Height = 12<br> Caption = '系统名称:'<br> Font.Charset = GB2312_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = '宋体'<br> Font.Style = []<br> ParentFont = False<br> IsControl = True<br> end<br> object Version: TLabel<br> Left = 60<br> Top = 25<br> Width = 60<br> Height = 12<br> Caption = '版 本:'<br> Font.Charset = GB2312_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = '宋体'<br> Font.Style = []<br> ParentFont = False<br> IsControl = True<br> end<br> object Copyright: TLabel<br> Left = 60<br> Top = 41<br> Width = 60<br> Height = 12<br> Caption = '版权所有:'<br> IsControl = True<br> end<br> object others: TLabel<br> Left = 13<br> Top = 124<br> Width = 6<br> Height = 12<br> end<br> object Bevel1: TBevel<br> Left = -8<br> Top = 109<br> Width = 344<br> Height = 7<br> Shape = bsBottomLine<br> end<br> object lblOs: TLabel<br> Left = 13<br> Top = 80<br> Width = 60<br> Height = 12<br> Caption = '操作系统:'<br> IsControl = True<br> end<br> object lblMemory: TLabel<br> Left = 13<br> Top = 96<br> Width = 60<br> Height = 12<br> Caption = '可用内存:'<br> IsControl = True<br> end<br> end<br> object BitBtn1: TBitBtn<br> Left = 145<br> Top = 184<br> Width = 80<br> Height = 25<br> Caption = '确定'<br> Default = True<br> ModalResult = 2<br> TabOrder = 1<br> OnClick = OKButtonClick<br> Glyph.Data = {<br> DE010000424DDE01000000000000760000002800000024000000120000000100<br> 0400000000006801000000000000000000001000000010000000000000000000<br> 80000080000000808000800000008000800080800000C0C0C000808080000000<br> FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333<br> 3333333333333333333333330000333333333333333333333333F33333333333<br> 00003333344333333333333333388F3333333333000033334224333333333333<br> 338338F3333333330000333422224333333333333833338F3333333300003342<br> 222224333333333383333338F3333333000034222A22224333333338F338F333<br> 8F33333300003222A3A2224333333338F3838F338F33333300003A2A333A2224<br> 33333338F83338F338F33333000033A33333A222433333338333338F338F3333<br> 0000333333333A222433333333333338F338F33300003333333333A222433333<br> 333333338F338F33000033333333333A222433333333333338F338F300003333<br> 33333333A222433333333333338F338F00003333333333333A22433333333333<br> 3338F38F000033333333333333A223333333333333338F830000333333333333<br> 333A333333333333333338330000333333333333333333333333333333333333<br> 0000}<br> NumGlyphs = 2<br> end<br> end<br> <br> </span></li> <li> </li> <li> </li> <li><span style=font-family: 宋体, serif; font-size: 9pt>版主:梁明<br> 日期:1999-03-09-19:30<br> E-mail:<a href=mailto:delphifan@990.net>delphifan@990.net</a></span></li></ul><hr></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -