大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 技术开发 -> 程序开发 -> 给自己的程序制作复活节彩蛋

给自己的程序制作复活节彩蛋

时间: 2021-07-31 作者:daque

//主窗体 unit unit1; interface uses windows, messages, sysutils, classes, graphics, controls, forms, dialogs, stdctrls, comctrls; type tform1 = class(tform) button1: tbutton; statusbar1: tstatusbar; procedure button1click(sender: tobject); private { private declarations } public { public declarations } end; var form1: tform1; implementation uses about; {$r *.dfm} procedure tform1.button1click(sender: tobject); begin aboutbox.showmodal; end; end. //about窗体 {=============通用about步调源代码=============} {                                              } {    _/\_/\__ copyright by 梁 明 __/\_/\_     } {                           1998-01-02          } {                                              } {=============================================} unit about; interface uses windows, sysutils, classes, graphics, forms, controls, stdctrls, buttons, extctrls,dialogs; type taboutbox = class(tform) panel1: tpanel; programicon: timage; productname: tlabel; version: tlabel; copyright: tlabel; others: tlabel; author: tpaintbox; bitbtn1: tbitbtn; bevel1: tbevel; lblos: tlabel; lblmemory: tlabel; procedure formcreate(sender: tobject); procedure programiconclick(sender: tobject); procedure okbuttonclick(sender: tobject); procedure formkeypress(sender: tobject; var key: char); private { private declarations } s:string; procedure delay(x,y:word);//延时步调 procedure getosinfo; //体例消息步调 procedure getmemoryinfo ; //可用资源步调 public { public declarations } end; var aboutbox: taboutbox; implementation {$r *.dfm} procedure taboutbox.getmemoryinfo ;//可用资源 var ms: tmemorystatus; begin     ms.dwlength := sizeof(tmemorystatus);     globalmemorystatus(ms); lblmemory.caption :=lblmemory.caption +formatfloat('#,###" kb"', ms.dwtotalphys div 1024); end; procedure taboutbox.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 %d.%d (build %d)', [platform, win32majorversion, win32minorversion, buildnumber]) else lblos.caption := lblos.caption+format('%s %d.%d (build %d: %s)', [platform, win32majorversion, win32minorversion, buildnumber, win32csdversion]); end else lblos.caption := lblos.caption+format('%s %d.%d', [platform, win32majorversion, win32minorversion]) end; procedure taboutbox.delay(x,y:word); var timeout:tdatetime; begin //该变成windows app启用功夫这个因变量来做! timeout:=now+encodetime(0,x div 60,x mod 60,y); while now<timeout do application.processmessages; end; procedure taboutbox.formcreate(sender: tobject); begin {**********************************************} try caption:='对于'+application.title; //题目 programicon.picture.icon:=application.icon; //图标 productname.caption:=productname.caption+application.title;//产物称呼 version.caption:=version.caption+'1.00'; //本子 copyright.caption:=copyright.caption+'华夏 ● 西安 梁明处事室 '; others.caption:='警 告:一经承诺,任何部分、单元不得以任何办法'+#13#10+ '不法正片、盗用!要不,体例在运转进程中展示的任何'+#13#10+ '题目作家将不负任何连带负担!'; ////初始化--------------------------- getmemoryinfo; getosinfo; {***********************} //初始化变量s... s:=''; except messagebox(handle,'某些消息不许博得','提醒',mb_ok); end; end; procedure taboutbox.programiconclick(sender: tobject); var i,fontheight:byte; begin 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+'"体例!'); textout(25,100+fontheight-i,''); textout(25,100+fontheight*2-i,'体例证明——'); textout(25,100+fontheight*3-i,'软硬件作家:梁 明'); textout(25,100+fontheight*4-i,'开拓前者:borland delphi 4.0'); textout(25,100+fontheight*5-i,'数据处置:borland paradox 7.0'); textout(25,100+fontheight*6-i,'开拓周期:99/02/10-99/02/13'); textout(25,100+fontheight*7-i,''); textout(25,100+fontheight*8-i,'本领扶助——'); textout(25,100+fontheight*9-i,'热线扶助:(029)7295153 梁教师'); textout(25,100+fontheight*10-i,'简单传呼:126-5030345 梁教师'); textout(25,100+fontheight*11-i,'电子邮件:delphifan@990.net'); textout(25,100+fontheight*12-i,'网上效劳:liangming.163.net'); textout(25,100+fontheight*13-i,''); textout(25,100+fontheight*14-i,' 梁 明 于梁明处事室 '); textout(25,100+fontheight*15-i,' 1999/02/10'); delay(0,20); end; finally panel1.show; aboutbox.refresh; end; end; procedure taboutbox.okbuttonclick(sender: tobject); begin panel1.show; aboutbox.refresh; close; end; procedure taboutbox.formkeypress(sender: tobject; var key: char); begin s:=s+key; //用户输出"author"这表露 if strupper(pchar(s))='author' then begin programiconclick(sender); s:='' end; end; end. 窗体as text代码 //主窗体 object form1: tform1 left = 195 top = 103 width = 324 height = 186 caption = '演练-->梁明' color = clbtnface font.charset = gb2312_charset font.color = clwindowtext font.height = -12 font.name = '宋体' font.style = [] oldcreateorder = false pixelsperinch = 96 textheight = 12 object button1: tbutton left = 192 top = 48 width = 75 height = 25 hint = '表露对于对话框' caption = '对于...' parentshowhint = false showhint = true taborder = 0 onclick = button1click end object statusbar1: tstatusbar left = 0 top = 140 width = 316 height = 19 autohint = true panels = < item width = 50 end> simplepanel = false end end //about窗体 object aboutbox: taboutbox left = 410 top = 92 borderstyle = bsdialog clientheight = 213 clientwidth = 362 color = clbtnface font.charset = gb2312_charset font.color = clwindowtext font.height = -12 font.name = '宋体' font.style = [] icon.data = { 0000010001002020100000000000e80200001600000028000000200000004000 0000010004000000000080020000000000000000000000000000000000000000 000000008000008000000080800080000000800080008080000080808000c0c0 c0000000ff0000ff000000ffff00ff000000ff00ff00ffff0000ffffff000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000330000000000000000000000033303303303300000000000000 0003303330333003003300000000000000033003330330002333000000000000 0030000033003033333000000000000033333330000003330003330000000803 33333333333333300233330000000f033333333333333302333bb03000004f83 33333333333333333bb003bb00004ff3333333333333b33bb0033bbb00004ff3 33333333b3bb3bb0033bbbb000004ff83b333b3b3b3bbbb03bbbbb0300f04fff 33b3b3b3bbbbbbbbbbbb00330ff04fff8b3b3333bbbbbbbbbb0033330ff044ff f8bbb03033bbbbb330333330fff444fff8bb0bb3003b330003333330ff44444f f88b3bbb300000033333b33fff44444fff3bb0bbb3000333b33bb38ff4444444 ff003b0bb333333bbbbbb3fff44444444ff00030bbbbbbbbbbbbbbff44444444 0000000303bbb3300000bff444444400000000000000000000000ff444440000 0000000000000000000000444444000000000000000000000000000044440000 0000000000000000000000000444000000000000000000000000000000040000 000000000000000000000000000000000000000000000000000000000000ffff ffffffffffffffff1fffff8003fffc0000fff800007ff800007fe000003f0000 001f0000001f0000000f00000007000000070000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000c0 00000fe01f003fffff80ffffffc0fffffff0fffffff8fffffffeffffffff} keypreview = true oldcreateorder = true position = poscreencenter oncreate = formcreate onkeypress = formkeypress pixelsperinch = 96 textheight = 12 object author: tpaintbox left = 0 top = 8 width = 364 height = 159 font.charset = gb2312_charset font.color = clblue font.height = -12 font.name = '宋体' font.style = [] parentfont = false end object panel1: tpanel left = 8 top = 7 width = 347 height = 170 bevelouter = bvnone parentcolor = true taborder = 0 object programicon: timage left = 13 top = 7 width = 32 height = 32 autosize = true onclick = programiconclick iscontrol = true end object productname: tlabel left = 60 top = 9 width = 60 height = 12 caption = '体例称呼:' font.charset = gb2312_charset font.color = clwindowtext font.height = -12 font.name = '宋体' font.style = [] parentfont = false iscontrol = true end object version: tlabel left = 60 top = 25 width = 60 height = 12 caption = '版 本:' font.charset = gb2312_charset font.color = clwindowtext font.height = -12 font.name = '宋体' font.style = [] parentfont = false iscontrol = true end object copyright: tlabel left = 60 top = 41 width = 60 height = 12 caption = '版权一切:' iscontrol = true end object others: tlabel left = 13 top = 124 width = 6 height = 12 end object bevel1: tbevel left = -8 top = 109 width = 344 height = 7 shape = bsbottomline end object lblos: tlabel left = 13 top = 80 width = 60 height = 12 caption = '操纵体例:' iscontrol = true end object lblmemory: tlabel left = 13 top = 96 width = 60 height = 12 caption = '可用外存:' iscontrol = true end end object bitbtn1: tbitbtn left = 145 top = 184 width = 80 height = 25 caption = '决定' default = true modalresult = 2 taborder = 1 onclick = okbuttonclick glyph.data = { de010000424dde01000000000000760000002800000024000000120000000100 0400000000006801000000000000000000001000000010000000000000000000 80000080000000808000800000008000800080800000c0c0c000808080000000 ff0000ff000000ffff00ff000000ff00ff00ffff0000ffffff00333333333333 3333333333333333333333330000333333333333333333333333f33333333333 00003333344333333333333333388f3333333333000033334224333333333333 338338f3333333330000333422224333333333333833338f3333333300003342 222224333333333383333338f3333333000034222a22224333333338f338f333 8f33333300003222a3a2224333333338f3838f338f33333300003a2a333a2224 33333338f83338f338f33333000033a33333a222433333338333338f338f3333 0000333333333a222433333333333338f338f33300003333333333a222433333 333333338f338f33000033333333333a222433333333333338f338f300003333 33333333a222433333333333338f338f00003333333333333a22433333333333 3338f38f000033333333333333a223333333333333338f830000333333333333 333a333333333333333338330000333333333333333333333333333333333333 0000} numglyphs = 2 end end

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.