2010年11月24日

关于 Delphi 中流的使用 压缩与解压缩(TCompressionStream、TDecompressionStream)

摘要: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton... 阅读全文

posted @ 2010-11-24 18:58 haiou327'Blog 阅读(657) 评论(0) 推荐(0)

字符串函数大全

摘要: 代码 阅读全文

posted @ 2010-11-24 17:02 haiou327'Blog 阅读(329) 评论(0) 推荐(0)

swf资源文件释放

摘要: //定义一个资源文件 .rc {MySwf RC_DATA "c:\123.swf" MySwf 为资源标识符,可任意,RC_DATA 不可改 再用brcc32编译生成.res文件 包含资源文件} {$ 资源文件名} //打开过程 procedure TForm1.Button7Click... 阅读全文

posted @ 2010-11-24 16:51 haiou327'Blog 阅读(173) 评论(0) 推荐(0)

2010年11月23日

资源文件制作及使用

摘要: 一、引子: 现在的Windows应用程序几乎都使用图标、图片、光标、声音等,我们称它们为资源(Resource)。最简单的使用资源的办法是把这些资源的源文件打入软件包,以方便程序需要的时候调用。资源是程序的一部分,程序要正常运行就离不了资源文件。但是它是不可执行代码。 为了更好地管理资源,Delphi中提供了一种.RES类型的资源文件。它可以把我们程序中所需要的资源整合到一个资源文件(.RES)... 阅读全文

posted @ 2010-11-23 19:18 haiou327'Blog 阅读(228) 评论(0) 推荐(0)

Delphi编程(OOP)

摘要: 刚刚接触的Delphi的朋友,可能最感兴趣的就是它丰富、强大的VCL(可视化构件库)。仅仅向窗体上扔几个构件,甚至不用动手写代码,就能很容易地做出一个有实用价值的程序,真是令人激动。但是,VCL只是Delphi的一小部分,Delphi的优秀远远不只是表现在VCL上。如果你仅仅停留在使用VCL这一阶段,那么你永远也不可能成为一个真正的Delphi高手。记住,必须超越VCL,才能够接触到Delphi... 阅读全文

posted @ 2010-11-23 19:14 haiou327'Blog 阅读(277) 评论(0) 推荐(0)

procedure CopyDirectoryTree

摘要: procedure CopyDirectoryTree(AHandle: THandle; const AFromDirectory, AToDirectory: String); var SHFileOpStruct: TSHFileOpStruct; FromDir: PChar; ToDir: PChar; begin GetMem(FromDir, Leng... 阅读全文

posted @ 2010-11-23 18:58 haiou327'Blog 阅读(113) 评论(0) 推荐(0)

Copy File

摘要: var Buf: array[1..1024] of Char; ReadNum, WriteNum: Integer; Fs, Fd: file of byte; FileLength: Integer; begin AssignFile(Fs, Edt1.text); Reset(Fs); AssignFile(Fd, Edt2.Text); Rewrite... 阅读全文

posted @ 2010-11-23 18:57 haiou327'Blog 阅读(129) 评论(0) 推荐(0)

拖动

摘要: uses ShellAPI; //定义过程 procedure WMDROPFILES(var Msg: TMessage); message WM_DROPFILES; //变量 var afilename: string; // 实现过程 procedure TForm1.WMDROPFILES(var Msg: TMessage); var FilesCount: In... 阅读全文

posted @ 2010-11-23 18:50 haiou327'Blog 阅读(198) 评论(0) 推荐(0)

Function AllocConsole

摘要: Function AllocConsole var s: string; begin AllocConsole; try Write('请输入 然后按 [ENTER]'); Readln(s); ShowMessage('您输入了: ' + s); finally FreeConsole; end; end; 阅读全文

posted @ 2010-11-23 18:49 haiou327'Blog 阅读(139) 评论(0) 推荐(0)

new

摘要: new 1. var a:^integer; {在栈内分配内存,指针型a所占的内存大小为4} begin new(a); {在堆内分配出一大小sizeof(integer)地址赋予a} a^:=34; {地... 阅读全文

posted @ 2010-11-23 18:48 haiou327'Blog 阅读(217) 评论(1) 推荐(0)

导航