| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3957 人关注过本帖, 1 人收藏
标题:速要解决的小小问题:怎么用Deiphl做一个计算器的程序
只看楼主 加入收藏
无处躲避
Rank: 1
等 级:新手上路
帖 子:22
专家分:0
注 册:2004-10-9
收藏
得分:0 

不知阿珠JD1 大侠是否愿意呢?

小弟在次先谢了!

因为学校这几天在改DNS SO 小弟有些怠慢了。


五年后硅谷的中国人才 小弟 邮箱: aeolusfly.student@ aeolusfly@
2004-10-14 14:24
知秋一页
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2004-11-6
收藏
得分:0 
多半都是拿来交作业的,呵呵,以前我也有这样的经历!
2004-11-06 10:55
方方
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2006-6-11
收藏
得分:0 

zhuangxueting.stud@163.com
谢谢大侠啊

2006-06-29 18:52
volte
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:69
帖 子:1167
专家分:1316
注 册:2004-12-19
收藏
得分:0 
学delphi怎么这东西还要求助,

那还学什么编程。

大家都是朋友,有空就来坐坐!
2006-06-29 19:14
小虫313
Rank: 1
等 级:新手上路
帖 子:289
专家分:0
注 册:2006-6-26
收藏
得分:0 

不懂就问啦


我只想对她说:“天鹅飞去鸟不归 良字无头双人配 受字中间多两笔,人尔结合是自己!”
2006-06-30 15:11
逍遥居士
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-7-27
收藏
得分:0 

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, ExtCtrls, StdCtrls;

type
TForm1 = class(TForm)
Edit1: TEdit;
Panel1: TPanel;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
SpeedButton4: TSpeedButton;
SpeedButton5: TSpeedButton;
SpeedButton6: TSpeedButton;
SpeedButton7: TSpeedButton;
SpeedButton8: TSpeedButton;
SpeedButton9: TSpeedButton;
SpeedButton10: TSpeedButton;
SpeedButton11: TSpeedButton;
SpeedButton12: TSpeedButton;
SpeedButton13: TSpeedButton;
SpeedButton14: TSpeedButton;
SpeedButton15: TSpeedButton;
SpeedButton16: TSpeedButton;
SpeedButton17: TSpeedButton;
procedure SpeedButton15Click(Sender: TObject);
procedure SpeedButton14Click(Sender: TObject);
procedure SpeedButton13Click(Sender: TObject);
procedure SpeedButton12Click(Sender: TObject);
procedure SpeedButton11Click(Sender: TObject);
procedure SpeedButton10Click(Sender: TObject);
procedure SpeedButton9Click(Sender: TObject);
procedure SpeedButton8Click(Sender: TObject);
procedure SpeedButton7Click(Sender: TObject);
procedure SpeedButton6Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton5Click(Sender: TObject);
procedure SpeedButton4Click(Sender: TObject);
procedure SpeedButton3Click(Sender: TObject);
procedure SpeedButton16Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton17Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
s:string;
a:real;
b:integer;
implementation

{$R *.dfm}

procedure TForm1.SpeedButton15Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'1';
end;

procedure TForm1.SpeedButton14Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'2';
end;

procedure TForm1.SpeedButton13Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'3';
end;

procedure TForm1.SpeedButton12Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'4';
end;

procedure TForm1.SpeedButton11Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'5';
end;

procedure TForm1.SpeedButton10Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'6';
end;

procedure TForm1.SpeedButton9Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'7';
end;

procedure TForm1.SpeedButton8Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'8';
end;

procedure TForm1.SpeedButton7Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'9';
end;

procedure TForm1.SpeedButton6Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'0';
end;

procedure TForm1.SpeedButton1Click(Sender: TObject);
begin

b:=1;
s:=edit1.Text;
edit1.Clear;
end;

procedure TForm1.SpeedButton5Click(Sender: TObject);
begin

b:=2;
s:=edit1.Text;
edit1.Clear;
end;

procedure TForm1.SpeedButton4Click(Sender: TObject);
begin
b:=3;
s:=edit1.Text;
edit1.Clear;
end;

procedure TForm1.SpeedButton3Click(Sender: TObject);
begin

b:=4;
s:=edit1.Text;
edit1.Clear;
end;

procedure TForm1.SpeedButton16Click(Sender: TObject);
begin
edit1.Clear;
end;

procedure TForm1.SpeedButton2Click(Sender: TObject);
begin
case b of
1:a:=strtofloat(s)+strtofloat(edit1.text);
2:a:=strtofloat(s)-strtofloat(edit1.text);
3:a:=strtofloat(s)*strtofloat(edit1.text);
4:a:=strtofloat(s)/strtofloat(edit1.text);
end;
edit1.text:=floattostr(a);


end;

procedure TForm1.SpeedButton17Click(Sender: TObject);
begin
edit1.Text:=edit1.Text+'.';
end;

end.

2006-07-27 20:18
pulf
Rank: 1
等 级:新手上路
帖 子:78
专家分:0
注 册:2006-7-31
收藏
得分:0 
search baidu


2006-08-04 15:23
快速回复:速要解决的小小问题:怎么用Deiphl做一个计算器的程序
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027284 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved