DelphiÊ°ÒÅ£¨7£© ²ÎÊýÓë·µ»ØÖµ
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
//·µ»ØÖµÎÊÌâ
function Add(x, y: Integer): Integer;
function Add_Res(x, y: Integer): Integer;
//¹ØÓÚº¯ÊýµÄ²ÎÊýÎÊÌâ
//²ÎÊý¿ÉÒÔ·ÖΪ: ĬÈϲÎÊý(´«Öµ)¡¢var(´«Ö·)¡¢out(Êä³ö)¡¢const(³£Êý)ËÄÀà
function MyFun1(Value: Integer): Integer;
function MyFun2(var Value: Integer): Integer;
function MyFun3(out Value: Integer): Integer;
function MyFun4(const Value: Integer): Integer;
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
{ TForm2 }
function TForm2.Add(x, y: Integer): Integer;
begin
Add := x + y; //ʹÓú¯ÊýÃû×÷Ϊ·µ»Ø´æ´¢±äÁ¿ £¨ÉÙÓã©
// Add := Add + 1; // º¯ÊýÃû×÷Ϊ·µ»Ø´æ´¢±äÁ¿ ²»ÄܽøÐÐÔËËã²Ù×÷
end;
function TForm2.Add_Res(x, y: Integer): Integer;
begin
Result := x + y;
Result := Result + 1;
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
ShowMessage(IntToStr(Add(2, 4))); // 6
ShowMessage(IntToStr(Add_Res(2, 4))); // 7
end;
{ĬÈϲÎÊýÊÇ´«Öµ, »á±»¸Ä±ä}
function TForm2.MyFun1(Value: Integer): Integer;
begin
Inc(Value);
Result := Value;
end;
{var²ÎÊýÊÇ´«Ö·, »á±»¸Ä±ä}
function TForm2.MyFun2(var Value: Integer): Integer;
begin
Inc(Value);
Result := Value;
end;
{out²ÎÊýÊÇΪ֧³ÖComµÄ, ºÍ var µÄ½á¹ûÊÇÒ»ÑùµÄ, Ò»°ãÎÒÃÇÓò»×ÅËü}
function TForm2.MyFun3(out Value: Integer): Integer;
begin
Inc(Value);
Result := Value;
end;
{const²ÎÊýÊǾø¶Ô²»¿ÉÒÔ¸³ÖµµÄ, ÕâÊDZ»±àÒëÆ÷ÓÅ»¯µÄ·½Ê½, ¾¡Á¿¶àÓÃ}
function TForm2.MyFun4(const Value: Integer): Integer;
begin
// Inc(Value); ³£Á¿Öµ²»Äܱ»¸Ä±ä£¬Ç¿Ðиıä»á±¨´í
Result := Value;
end;
procedure TForm2.Button2Click(Sender: TObject);
var
a: Integer;
Ïà¹ØÎĵµ£º
//**************ÐèҪǿµ÷µÄÁ½¸ö¿ì½Ý¼ü**********************
51.CTRL+SHIFT+U ´úÂëÕû¿é×óÒÆ2¸ö¿Õ¸ñλÖÃ
52.CTRL+SHIFT+I ´úÂëÕû¿éÓÒÒÆ2¸ö¿Õ¸ñλÖÃ
60.Ctrl+Alt+c ×¢ÊÍ¿é
61.Ctrl+Alt+u & ......
·½·¨Ò»£º
Ö±½Óµ¯³öUDL¶Ô»°¿ò:
use
ADOConed;
EditConnectionString(ADOQuery1);
·½·¨¶þ£º
¢Å¡¢ÓÒ¼ü---н¨---Îı¾Îĵµ£¬ÖØÃüÃûΪ connSet.udl ¡£
¢Æ¡¢Ë«»÷´ò¿ª connSet.udl °´Ìáʾ²Ù×÷ÅäÖÃÊý¾Ý¿â£¬Ñ¡Ôñ±¾µØ»òÔ¶³ÌÊý¾Ý¿â£¬ÅäÖúúóÍ˳ö¡£
¢Ç¡¢Ê¹ÓÃDelphi ¿Ø¼þTADOConnectionÁ¬½Ó´úÂ룺
ÔÚForm ......
Ò»¡¢ ÍøÂç²¼¾Ö
һ̨ÖÐÐÄSQL·þÎñÆ÷£¨¼ò³Æ£ºÖÐÐÄ·þÎñÆ÷£©£¬¶ą̀·Ö²¼ÔÚ²»Í¬µØÓòµÄSQL·þÎñÆ÷£¨¼ò³Æ£º±¾µØ·þÎñÆ÷£©£¬¸÷¸ö±¾µØ·þÎñÆ÷ºÍÖÐÐÄ·þÎñÆ÷¶¼ÄÜͨ¹ýinternetʵÏÖÍøÂ绥Á¬¡£
¶þ¡¢ËùÓÃÓïÑÔ¼°Êý¾Ý¿â£ºDelphi +Sql
¶þ¡¢ ͨÐÅÒªÇó
ÿ̨±¾µØ·þÎñÆ ......
Ò»¡¢DelphiÖÐÁ÷µÄ»ù±¾¸ÅÄî¼°º¯ÊýÉùÃ÷
ÔÚDelphiÖÐ,ËùÓÐÁ÷¶ÔÏóµÄ»ùÀàΪTStreamÀà,ÆäÖж¨ÒåÁËËùÓÐÁ÷µÄ¹²Í¬ÊôÐԺͷ½·¨¡£ TStreamÀàÖж¨ÒåµÄÊôÐÔ½éÉÜÈçÏÂ: 1¡¢Size:´ËÊôÐÔÒÔ×Ö½Ú·µ»ØÁ÷ÖÐÊý¾Ý´óС¡£ 2¡¢Position:´ËÊôÐÔ¿ØÖÆÁ÷ÖдæÈ¡Ö¸ÕëµÄλÖᣠTstreamÖж¨ÒåµÄÐé·½·¨ÓÐËĸö: 1¡¢Read:´Ë·½·¨ÊµÏÖ½«Êý¾Ý´ÓÁ÷ÖжÁ³ö¡£º¯ÊýÔÐÎΪ: ......
TDXDraw DirectDraw ºÍ Direct3D ×é¼þ
TDXDIB ÈÝÄÉDIB£¨É豸ÎÞ¹Øλͼ£¬Device Independent Bitmap£©µÄ×é¼þ
TDXImageList ͼƬÁбí×é¼þ
TDX3D Direct3D ×é¼þ £¨ºÍTDXDrawÒ»ÆðʹÓã©
TDXSound DirectSound ×é¼þ
TDXWave ÈÝÄÉ Wave£¨²¨ÐÎÒôƵ ......