. , , ,

,,,

. — ,

. , . () TApplication. :

OnActionExecute: TActionEvent Execute .
OnActionUpdate: TNotifyEvent Update;
OnActivate: TNotifyEvent .
OnDeactivate:TNotifyEvent Windows
OnException: TExceptionEvent
OnHelp: THelpEvent .
OnHint: TNotifyEvent , (Hint)
OnIdle: TNotifyEvent
OnMessage: TMessageEvent Windows
OnMinimize: TNotifyEvent
OnRestore: TNotifyEvent
OnShowHint: TShowHintEvent (Hint)

, , . . Caption '0';

unit Unit1;

interface

uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

StdCtrls;

type

TForm1 = class(TForm)

Button1: TButton;

Label1: TLabel;

procedure Button1Click(Sender: TObject);

private

{ Private declarations }

procedure count(Sender:TObject; var Done:boolean);

procedure stop(var Msg:TMsg; var Handled:boolean);

public

{ Public declarations }

end;

var

Form1: TForm1;

implementation

{$R *.DFM}

procedure Tform1.Count;

begin

label1.Caption:=IntToStr(StrToInt(label1.caption)+1);//

Done:=false;

end;

procedure TForm1.stop(var Msg:Tmsg; var Handled:boolean);

begin

if Msg.message=WM_KEYDOWN then begin //

Application.OnMessage:=nil;//

Application.OnIdle:=nil;//

Handled:=true;//

end;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

Application.OnIdle:=count;//

Application.OnMessage:=Stop;//

end;

end.

TApplication . .

HelpFile: String ,
Hint: String
HintHidePause: Integer , . 2500 .
HintPause: Integer , . 500 .
HintShortPause: Integer . 50 .
ShowHint: Boolean ( ). False,

, - Screen. . , . , , : - , , , , . , Cursor, Screen. . - :

try

Screen.Cursor:=crHourGlass;

{- }

finally

Screen.Cursor:=crDefault;

end;

Screen . Width Height . PixelPerInch - .

, Combobox?? , , , . , Fonts. OnCreate , Combo , :

Combobox1.Items:=Screen.Fonts;

, Clipboard, . , , Uses Clipbrd. :

AsText: string .
FormatCount: integer , .
Formats [Index: Integer]: Word , Index[0..FormatCount-1].

, , Memo , OnCreate, :

Memo1.Text:=Clipboard.AsText;

. Clear, , (*.BMP *.WMF) Assign (Source: TPersistent).

, , .

http://bestcode.org/

. , . () TApplication.

 

 

 

! , , , .
. , :