Awkwardsaw
2009-05-29 02:12:51
im starting delphi(it looks fun, and should be easy since im already used to scar)
and i made a simple application, a calculator :)
what i want to know, is how do you publish it, or let other people see your work?
do you just save it as a .zip/.rar file, and attatch it?
if so, what are the things that you need in the .zip file
thanks in advanced :)
and, the code:
and i made a simple application, a calculator :)
what i want to know, is how do you publish it, or let other people see your work?
do you just save it as a .zip/.rar file, and attatch it?
if so, what are the things that you need in the .zip file
thanks in advanced :)
and, the code:
unit SimpleCalc;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
AnswerL: TLabel;
Label2: TLabel;
Label3: TLabel;
addition: TButton;
subtraction: TButton;
Multiplication: TButton;
Division: TButton;
Clear: TButton;
MBA: TLabel;
procedure FormCreate(Sender: TObject);
procedure additionClick(Sender: TObject);
procedure subtractionClick(Sender: TObject);
procedure MultiplicationClick(Sender: TObject);
procedure DivisionClick(Sender: TObject);
procedure ClearClick(Sender: TObject);
procedure MBAMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure MBAMouseLeave(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Edit1.text:= inttostr(0);
edit2.Text:= inttostr(0);
end;
procedure TForm1.additionClick(Sender: TObject);
var A, num1, num2: real;
begin
num1 := strtofloat(edit1.Text);
num2 := strtofloat(edit2.text);
A:= num1 + num2;
AnswerL.Caption:= (floattostr(a));
end;
procedure TForm1.subtractionClick(Sender: TObject);
var A, num1, num2: real;
begin
num1 := strtofloat(edit1.Text);
num2 := strtofloat(edit2.text);
A:= num1 - num2;
AnswerL.Caption:= (floattostr(a));
end;
procedure TForm1.MultiplicationClick(Sender: TObject);
var A, num1, num2: real;
begin
num1 := strtofloat(edit1.Text);
num2 := strtofloat(edit2.text);
A:= num1 * num2;
AnswerL.Caption:= (floattostr(a));
end;
procedure TForm1.DivisionClick(Sender: TObject);
var A, num1, num2: real;
begin
num1 := strtofloat(edit1.Text);
num2 := strtofloat(edit2.text);
A:= num1 / num2;
AnswerL.Caption:= (floattostr(a));
end;
procedure TForm1.ClearClick(Sender: TObject);
begin
edit1.Text := '0';
edit2.Text := '0';
AnswerL.Caption := 'Answer';
end;
procedure TForm1.MBAMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
MBA.Caption := 'Found me!';
end;
procedure TForm1.MBAMouseLeave(Sender: TObject);
begin
MBA.Caption := 'Made By Akwardsaw';
end;
end.