Delphiプログラミング

閲覧数1,730
ダウンロード数5
履歴確認

    • ページ数 : 8ページ
    • 会員550円 | 非会員660円

    資料紹介

    プログラム言語「delphi」による動画表示プログラム。
    for文の定回反復を使用。描画領域を逐次変更することでボールの動くさまを表現した。
    【プログラム】
    unit en;
    interface
    uses
    Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    StdCtrls;
    type
    TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    private
    { Private 宣言 }
    public
    { Public 宣言 }
    end;
    var
    Form1: TForm1;
    implementation
    {$R *.DFM}
    {$apptype console}
    procedure TForm1.Button1Click(Sender: TObject);
    procedure circle1(x,y,r:integer; pc,bc:longint);
    begin
    canvas.pen.color:=pc;
    canvas.brush.color:=bc;
    canvas.ellipse(x-r,y-r,x+r,y+r);
    sleep(60);
    canvas.pen.color:=Form1.color;
    canvas.brush.color:=Form1.color;
    canvas.ellipse(x-r,y-r,x+r,y+r);
    end;
    var a,b:integer;
    begin
    for a:=0 to 45 do begin
    b:=100+a*10;
    circle1(b,200,50,clLime,clAqua);
    end;
    end;
    procedure TForm1.Button2Click(Sender: TObject);
    procedure circle2(x,y:integer);
    var r:integer;
    begin
    r:=50;
    canvas.pen.color:=clLime;
    canvas.brush.color:=clYellow;
    canvas.ellipse(x-r,y-r,x+r,y+r);
    sleep(30);
    canvas.pen.color:=Form1.color;
    canvas.brush.color:=Form1.color;
    canvas.ellipse(x-r,y-r,x+r,y+r);
    end;
    var en_x,c:integer;
    const en_y:array[1..186] of integer = (0,5,10,15,20,25,30,35,40,45,50,60,70,80,90,100,120,140,160,150,140,130,120,110,100,90,80,70,65,60,55,50,45,40,35,30,25,30,35,40,45,50,55,60,70,80,90,100,110,120,140,160,150,140,130,120,110,100,90,80,75,70,65,60,55,50,55,60,65,70,75,80,90,100,110,120,130,140,160,150,140,130,120,110,100,95

    資料の原本内容 ( この資料を購入すると、テキストデータがみえます。 )

    プログラム言語「delphi」による動画表示プログラム。
    for文の定回反復を使用。描画領域を逐次変更することでボールの動くさまを表現した。
    【プログラム】
    unit en;
    interface
    uses
    Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    StdCtrls;
    type
    TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    private
    { Private 宣言 }
    public
    { Public 宣言 }
    end;
    var
    Form1: TForm1;
    implementation
    {$R *.DFM}
    {$apptype console}
    procedure TForm1.Button1Click(Sender: TObject);
    procedu...

    コメント0件

    コメント追加

    コメントを書込むには会員登録するか、すでに会員の方はログインしてください。