解决方案 »
- 有没有办法给用户提权的!!!!!!
- ???如何利用多线程像timer控件那样获取系统时间???
- 请教,将exe嵌入到了我的程序中,如果合并成1个进程??????很难吧?
- 从任务栏右键关闭程序引起的程序异常错误
- 求spcomm发送rs485的16进制的报文,高分!
- 监视dll文件中的函数
- 关于如何截获打印内容
- 請問,if (AA=1) and (AA=2) 可否改為 if (AA in [1,2])形式要怎樣改.
- 30分给愿意答简单问题的人:关于函数的参数的问题.
- delphixe10 调试程序关闭时出现下面的错误是什么原因?
- 菜鸟问题:form1:=Tform1.create(nil)和form1:=Tform1.create(self)有什么不同吗?参与者有分
- 如何对内存的读写?
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls,math;type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
StaticText1: TStaticText;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
SpeedButton4: TSpeedButton;
SpeedButton6: TSpeedButton;
SpeedButton7: TSpeedButton;
SpeedButton5: TSpeedButton;
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton3Click(Sender: TObject);
procedure SpeedButton4Click(Sender: TObject);
procedure SpeedButton5Click(Sender: TObject);
procedure SpeedButton6Click(Sender: TObject);
procedure SpeedButton7Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
statictext1.Caption:='+';
end;procedure TForm1.SpeedButton2Click(Sender: TObject);
begin
statictext1.Caption:='-';
end;procedure TForm1.SpeedButton3Click(Sender: TObject);
begin
statictext1.Caption:='*';
end;procedure TForm1.SpeedButton4Click(Sender: TObject);
begin
statictext1.Caption:='/';
end;procedure TForm1.SpeedButton5Click(Sender: TObject);
begin
statictext1.Caption:='pow';
end;procedure TForm1.SpeedButton6Click(Sender: TObject);
begin
statictext1.Caption:='sqrt';
end;procedure TForm1.SpeedButton7Click(Sender: TObject);
begin
if statictext1.Caption='+' then
edit3.Text:=floattostr(strtofloat(edit1.Text)+strtofloat(edit2.Text));
if statictext1.Caption='-' then
edit3.Text:=floattostr(strtofloat(edit1.Text)-strtofloat(edit2.Text));
if statictext1.Caption='*' then
edit3.Text:=floattostr(strtofloat(edit1.Text)*strtofloat(edit2.Text));
if statictext1.Caption='/' then
edit3.Text:=floattostr(strtofloat(edit1.Text)/strtofloat(edit2.Text));
if statictext1.caption='pow' then
edit3.Text:=floattostr(power(strtofloat(edit1.Text),strtofloat(edit2.Text)));
if statictext1.Caption='sqrt' then
edit3.Text:=floattostr(sqrt(strtofloat(edit1.Text)));
end;end.