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

Delphi ¹Ø¼ü×ÖÏê½â

 absolute
//ËüʹµÃÄãÄܹ»´´½¨Ò»¸öбäÁ¿, ²¢ÇҸñäÁ¿µÄÆðʼµØÖ·ÓëÁíÒ»¸ö±äÁ¿Ïàͬ.
var
Str: string[32];
StrLen: Byte absolute Str;
//Õâ¸öÉùÃ÷Ö¸¶¨Á˱äÁ¿StrLenÆðʼµØÖ·ÓëStrÏàͬ.
//ÓÉÓÚ×Ö·û´®µÄµÚ0¸öλÖñ£´æÁË×Ö·û´®µÄ³¤¶È, ËùÒÔStrLenµÄÖµ¼´×Ö·û´®³¤¶È.
begin
Str := 'abc';
Edit1.Text := IntToStr(StrLen);
end;
abstract
//ËüÔÊÐíÄã´´½¨³éÏóµÄ·½·¨, °üÀ¨ÓгéÏó·½·¨µÄÀà³ÆÎª³éÏóÀà.
//Abstract¹Ø¼ü×Ö±ØÐëÓëVirtual»òDynamic¹Ø¼ü×ÖͬʱʹÓÃ, ÒòΪ³éÏó·½·¨±ØÐë±»¸²¸ÇʽʵÏÖ.
//³éÏóÀ಻ÄÜʵÀý»¯, ³éÏó·½·¨²»Äܰüº¬·½·¨Ìå.
type
TDemo = class
private
protected
procedure X; virtual; abstract;
public
constructor Create;
destructor Destroy; override;
published
end;
and
//Ò»¡¢±íʾÂß¼­Óë
if (a>0) and (b>0) then
//¶þ¡¢±íʾλÔËËã
var
a,b,c: Integer;
begin
c := (a and b);
end;
//ʹÓÃAnd±íʾÂß¼­Ê±, And×óÓҵıí´ïʽ±ØÐëÓÃСÀ¨ºÅÀ¨Æð, ÒÔ±ÜÃâÒÔÉúÌõ¼þµÄ³åÍ».
//ÀýÈç:
if a>0 and b>0 then
//±àÒëÆ÷¿ÉÄÜ»áÀí½âΪ:
if a>(0 and b)>0 then
//»ò:
if (a>0) and (b>0) then
//µ«ÊÇʵ¼Ê±àÒëʱ, ±àÒëÆ÷»á²úÉúÒ»¸ö³åÍ», ±¨¸æ´íÎó.
//²¢ÇÒµÚÒ»ÖÖ¿ÉÄܰüº¬ÁËa>b>cµÄÐÎʽ, ÕâÔÚDelphiÖв»±»Ö§³Ö.
//ËùÒÔʹÓÃAndÔËËã·ûʱ±ØÐëʹÓÃÀ¨ºÅ, ÒÔÇø·Ö×óÓÒµÄÌõ¼þ.
//±íʾλÔËËãʱҲ±ØÐë¼ÓÉÏÀ¨ºÅ, ½«AndÒÔ¼°×óÓÒ²ÎÊýÀ¨Æð.
array
//ArrayÓÃÓÚ±íʾÊý×é, ÈκεĶÔÏó¶¼Äܱ»ÉùÃ÷³ÉÊý×é.Êý×é·ÖΪ¾²Ì¬ºÍ¶¯Ì¬µÄ£²ÖÖ.
//¾²Ì¬Êý×é
var
Arr1: array [1..10] of Integer;
//¶¯Ì¬Êý×é, ÓÉÓÚÉùÃ÷ʱ²»ÖªÆäÔªËØ¸öÊý, ËùÒÔ±ØÐëÔÚºóÆÚÓÃSetLength·½·¨ÉèÖÃÊý×éµÄ´óС
var
Arr2: array of Integer;
//Êý×é×÷Ϊ²ÎÊýʱ, ²»ÄÜ´«ÈëÊý×éµÄ´óС, Ö»ÄÜ´«ÈëÊý×éÃû, È»ºóÓÃLength·½·¨»ñÈ¡Êý×éµÄÔªËØ¸öÊý
function X(A: array of Integer): Integer;
var
i: Integer;
begin
Result := 0;
for i := 0 to Length(A)-1 do
Result := Result + A[i];
end;
as
//AsÓÃÓÚ½«Ò»¸ö¶ÔÏóת»»ÎªÁíÒ»¸ö¶ÔÏó
procedure BtnClick(Sender:TObject);
begin
(Sender as TButton).Caption := 'Clicked';
end;
//¶ÔÓÚ¶ÔÏóÌî³ä½Ó¿ÚµÄת»», ±ØÐëÓÃAs½øÐÐ
(HTTPRIO as IExp).GetConnection;
//As²»ÄÜÓÃÓÚÊý¾ÝÀàÐ͵Äת»», ÏÂÃæµÄ´úÂë


Ïà¹ØÎĵµ£º

ÈçºÎÈÃDelphiµ÷ÓÃÍⲿ³ÌÐò²¢µÈ´ýÆäÔËÐÐÐÅÏ¢£¨Èç½áÊø£©

º¯ÊýÒ»£º
view plaincopy to clipboardprint?
uses 
    Windows,  
    SysUtils,  
    Classes,  
    ShellAPI;  
function RunAndWait(FileName: string; Visibility: Integer): THandle;&nbs ......

ÔÚdelphi 2010 Éϰ²×° RemObjects 6.0.39.777

×÷ΪdelphiµÄÌú¸Ë£¬ÔÚÕýʽDelphi2010ÍÆ³öºó£¬ÎÒµ±È»Ò²Òª³¢³¢ÐÂÏÊ£¬Óõç¿ÏÂÀ´ÒÔºó°²×°¡£ºÇºÇ¶þÊ®¶à·ÖÖӾ͸㶨ÁË£¬Æô¶¯Ò²Ìؿ죬¼òµ¥Ê¹ÓÃһϣ¬°ô°ô£¡£¡¿´À´Delphi£¨Ì«ÑôÉñ£©ÓÖ»ØÀ´ÁË£¬ÈçÊÇÎÒ¾ö¶¨Åׯúdelphi2007£¬ÓÃÕâ¸öмһÎÒËùÓõĵÚÈý·½×é¼þÖ÷ÒªÊÇRemObjectsºÍreportbuilder£¬reportbuilder»¹Ã»ÓÐÕÒµ½°²×°forD2009 Ful ......

delphiÖÐʹÓÃ͸Ã÷¿Ø¼þµÄ¼¸ÖÖ·½·¨

ÓÐʱÐèҪʹÓÃ͸Ã÷¿Ø¼þÓÃÓÚ²¶»ñÊó±êÏûÏ¢
1.µ÷ÓÃWindows2000,xpеÄAPIº¯ÊýʵÏÖÕâÒ»¹¦ÄܵĹý³Ì¡£Ê¹ÓÃSetLayeredWindowAttributes
2.Ö±½ÓÉèÖÿؼþµÄalphablend,alphablendvalue£¬¼ä½Óµ÷ÓÃÉÏÊöapi.
3.ʹÓÃTStaticText¿Ø¼þ
procedure WMCtrlColor(var Message: TWMCtlColor); message WM_CTLCOLOR;
procedure TForm3.WMCtr ......

Delphi µÄ×Ö·û¼°×Ö·û´®[

Delphi µÄ×Ö·û¼°×Ö·û´®[1] - string¡¢AnsiString¡¢WideString¡¢String[n]¡¢ShortString
2008-10-17 14:57:17
//×î³£ÓÃµÄ string
var
  str: string;   {¶¨Òå}
begin
  str := 'ÍòÒ»'; {¸³Öµ}
  ShowMessage(IntToStr(Length(str))); {³¤¶ÈÊÇ: 4}
end;
//³¤×Ö·û´® AnsiString; ÔÚµ±Ç°°æ± ......

delphi DataSnap³²×´Ö÷´Ó±íʵÏÖ

·þÎñ¶Ë£ºÌí¼ÓADOConnection£¬ADOQuery1£¬ADOQuery2¡£ÉèÖÃADOQuery1ΪÖ÷±í£¬ADOQuery2Ϊ´Ó±í¡£(ͨ¹ý  ADOQuery2.SQL.Text:= 'select * from ´Ó±í where FKID=:Ö÷±íPKID'ÉèÖÃ)¡£Ìí¼ÓDataSetProvider1ºÍDataSetProvider2·Ö±ðÁ¬½Óµ½ADOQuery1ºÍADOQuery2¡£
¿Í»§¶Ë£ºÌí¼ÓClientDataSet1£¬ClientDataSet2¡£ClientDataS ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ