• Unit pxl; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs
  • Private declarations } public { Public declarations } end; Var Forml: TForml;
  • End; end.
  • M i s o 1
  • Procedure TForml.TimerlTimer(Sender




    Download 35,63 Kb.
    bet7/10
    Sana08.02.2024
    Hajmi35,63 Kb.
    #153462
    1   2   3   4   5   6   7   8   9   10
    Bog'liq
    Delphi tizimining oynasi va uning elementlari

    Procedure TForml.TimerlTimer(Sender: TObject); Begin
    Imagel.Free; Timerl.Free;
    end;

    Bu shuni bildiradiki, dasturlash ishga tushgandan so‘ng 3000 millisekunddan o ‘tishi bilan Imagel va Timerl komponentalari kompyuter xotirasidan va mos ravishda ekrandan o‘chiriladi.


    9.Tuzilgan loyiha (npoeier) ya’ni Projectl va Unitl standart modul nomlarini mos nomlar bilan almashtirib saqlanadi.
    10.Yangi nom bilan saqlangan loyiha, ya’ni ilova F9 tugmachasini bosish bilan ishga tushiriladi.
    Ilova ishga tushirilganda ekranda yuqoridagi 4-punktdagi rasm
    «zastavka» ko‘rinishida namoyon boladi.

    Tashkil qilingan modulning to‘liq ko‘rinishini keltiramiz:


    Unit pxl; interface uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtris, ExtCtris;
    Type
    TForml = class(TForm)
    procedure TimerlTimer(Sender: TObject); private
    { Private declarations } public
    { Public declarations } end;

    Var
    Forml: TForml;

    implementation
    {$R *.dfm}

    procedure TForml.TimerlTimer(Sender: TObject); begin
    Imagel.Free; Timerl.Free;
    End; end.

    Yaratilgan «zastavka»miz qism dasturining ishlashi davomida o‘chib-yonib turishi uchun quyidagi OnTimer hodisasini qayta ishlash kodini yozishimiz kerak bo‘ladi.


    Procedure TForml.TimerlTimer(Sender: TObject); Begin
    If Imagel.visible=true then Imagel.hide
    Else Imagel.Show;
    End;

    M i s o 1 :
    Oyning Yer atrofida aylanishini namoyish etuvchi ilova yaratish.


    Download 35,63 Kb.
    1   2   3   4   5   6   7   8   9   10




    Download 35,63 Kb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Procedure TForml.TimerlTimer(Sender

    Download 35,63 Kb.