I need VERY simple sample projects for DELPHI 3

I'm just a starter with delphi and i'm having big problems.
Can somebody help me with some VERY simple project.
The delphi help-index can't help me.

Thanks,
Cees



Comments

  • : I'm just a starter with delphi and i'm having big problems.
    : Can somebody help me with some VERY simple project.
    : The delphi help-index can't help me.
    :
    : Thanks,
    : Cees
    :
    :
    :
    :
    I could tutor you in creating your own projects. Here is one:
    - Start a new project
    - Place two TEdits, and one TButton on the form.
    - Double-click on the TButton. This creates a OnClick event for that button.
    - In this event you type the following between the PROCEDURE nad BEGIN:
    [code]
    var
    number1, number2: integer;
    [/code]
    - Between the BEGIN and END:
    [code]
    number1:=StrToInt(Edit1.Text);
    number2:=StrToInt(Edit2.Text);
    Button1.Caption:=IntToStr(number1+number2);
    [/code]
    Now the source-code should look something like this:
    [code]
    unit Unit1;

    interface

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

    type
    TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    private
    { Private declarations }
    public
    { Public declarations }
    end;

    var
    Form1: TForm1;

    implementation

    {$R *.DFM}

    procedure TForm1.Button1Click(Sender: TObject);
    var
    number1, number2: integer;
    begin
    number1:=StrToInt(Edit1.Text);
    number2:=StrToInt(Edit2.Text);
    Button1.Caption:=IntToStr(number1+number2);
    end;

    end.
    [/code]
    Run the project and see what happens, if you type two numbers in the edits and press the button.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion