delphi¶¯Ì¬Êý×éÈçºÎÈ¥µôÒ»¸öÔªËØ
procedure DynArrayDelete(var A;elSize:Longint;index,Count:Integer);
var
len,MaxDelete:Integer;
P:PLongint; //4 ¸ö×ֽڵij¤ÕûÐÎÖ¸Õë
begin
P:=PLongint(A);// È¡µÄ A µÄµØÖ·
if P = nil then
Exit;
len := PLongint(PChar(P) - 4)^; // ±äÁ¿µÄ³¤¶È £¬Æ«ÒÆÁ¿ -4
if index >= len then //Ҫɾ³ýµÄλÖó¬³ö·¶Î§£¬Í˳ö
Exit;
MaxDelete := len - index; // ×î¶àɾ³ýµÄÊýÁ¿
Count := Min(Count, MaxDelete); // È¡µÃÒ»¸ö½ÏСֵ
if Count = 0 then // ²»ÒªÇóɾ³ý
Exit;
Dec(len,Count);// Òƶ¯µ½ÒªÉ¾³ýµÄλÖÃ
MoveMemory(PChar(P)+index*elSize , PChar(P)+(index + Count)*elSize , (len-index)*elSize); //Òƶ¯ÄÚ´æ
Dec(P); //ÒƳö ¡°Êý×鳤¶È¡±Î»ÖÃ
Dec(P); //ÒƳö¡°ÒýÓüÆÊý¡± λÖÃ
//ÖØÐÂÔÙ·ÖÅäµ÷ÕûÄÚ´æ,len еij¤¶È. Sizeof(Longint) * 2 = 2*Dec(P)
ReallocMem(P, len * elSize + Sizeof(Longint) * 2);
Inc(P); // Ö¸ÏòÊý×鳤¶È
P^ := len; // new length
Inc(P); // Ö¸ÏòÊý×éÔªËØ£¬¿ªÊ¼µÄλÖÃ
PLongint(A) := P;
end;
procedure TForm1.Button2Click(Sender: TObject);
type
Ttemp=record
a:integer;
b:string;
c:integer;
end;
var
temps:array of Ttemp;
i: Integer;
begin
setlength(temps,10);
Ïà¹ØÎÊ´ð£º
delphiÈçºÎÏòAccessÊý¾Ý±íÖÐ×Ô¶¨Òå×Ö¶Î?È»ºóÏÔʾµ½DBGridÖÐ
ÔõôûÈËÀíÎÒѽ
·Ö·Ö߯ÉÙßÖ£¬Ò»°ãÈ˶¼ÀÁµÃ½øÀ´¡¡*^_^*
SQL
creat table TableName(ID Counter Primary Key,FieldName varchar(20))
ADOQue ......
Õâ¸öÊÇÀ¹½Ø°´¼üÏûÏ¢²¢²âÊÔÊÇ·ñΪENTER¼ü¡£
begin
case wParam of
WM_KEYDOWN:
fEatKeystroke := (p.vkCode = VK_RETURN);
& ......
ÓÉÓÚ¿Í戶¶ËÓеÄÎļþ經³£¸üУ¨遠³ÌµÄ£¬²»ÊǾÖÓò網£©£¬
ËùÒÔÏë寫個×Ô動¸üÐ嵀 ³ÌÐò¡£
¿´網É쵀 ·½·¨資ÁÏ£¬ÖªµÀЩ·½·¨£¬µ«²»ÖªµÀ¾ß體Ôõô寫¡£
......
×òÍíÔÚDelphiÊý¾Ý¿â²éѯÖÐÓöµ½ÁËÒ»¸öÒɻ󡣴úÂëÈçÏ£º
procedure TFormSearchAchievement.ComboBoxXYChange(Sender: TObject);
var
XY : string;
begin
XY := comboboxxy.Items[comboboxx ......
ÇëÎÊÔõôѧϰDelphiѽ?
·¢ÏÖDelphiѧòËÆûÄÇôÈÝÒ×ѽ,²»Ïñjava,ÄÇô¶àÊé,ÊÓƵ,ºÍÅàѵ֮ÀàµÄ
delphiµÄ×ÊÁϾÍÊÇÉÙ£¬¶øÇÒ»¹ÀÏ
ÕÒ±¾Êé¿´¿´¾Í¶®ÁË¡£
DelphiµÄ×ÊÁϺֻܶ࣬ÊÇÏÖÔÚ¡¡,ÄãÕÒÕÒ´ó¸»ÎÌÀëÏßÊý¾Ý¿â° ......