马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 命苦不能怪ZF 于 2012-12-27 07:50 编辑 unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, mmsystem, ExtCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Label3: TLabel;
Image1: TImage;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Edit7: TEdit;
Button6: TButton;
Button5: TButton;
Edit6: TEdit;
Edit8: TEdit;
procedure WMNCHitTest(var M: TWMNCHitTest); message wm_NCHitTest;
procedure Edit1Click(Sender: TObject);
procedure Edit2Click(Sender: TObject);
procedure Edit3Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure Tform1.WMNCHitTest(var M: TWMNCHitTest);
begin
inherited; { call the inherited message handler }
if M.Result = htClient then { is the click in the client area? }
M.Result := htCaption; { if so, make Windows think it's }
{ on the caption bar. }
end;
procedure TForm1.Edit1Click(Sender: TObject);
begin
Edit1.Text:='';
end;
procedure TForm1.Edit2Click(Sender: TObject);
begin
Edit2.Text:='';
end;
procedure TForm1.Edit3Click(Sender: TObject);
begin
Edit3.Text:='';
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Label4.Caption:='+';
Edit3.Text:=FloatToStr(StrToFloat(Edit1.Text)+ StrToFloat(Edit2.Text) );
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Label4.Caption:='-';
Edit3.Text:=FloatToStr(StrToFloat(Edit1.Text)- StrToFloat(Edit2.Text));
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
Label4.Caption:='×';
Edit3.Text:=FloatToStr(StrToFloat(Edit1.Text)* StrToFloat(Edit2.Text));
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Label4.Caption:='÷';
Edit3.Text:=FloatToStr(StrToFloat(Edit1.Text)/ StrToFloat(Edit2.Text));
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
Close
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
{ Edit6.Text:=((Edit4.Text) + (Edit5.Text) + (Edit7.Text)) ; }
MCISendString('OPEN C:\WINDOWS\Media\flourish.mid TYPE SEQUENCER ALIAS NN', '', 0, 0);
MCISendString('PLAY NN FROM 0', '', 0, 0);
MCISendString('CLOSE ANIMATION', '', 0, 0);
ShowMessage( (Edit8.Text)+(Edit4.Text) + (Edit5.Text) + (Edit7.Text));
end;
end.
我了个不能上传图片新人啊悲催
Project1.rar
(227.43 KB, 下载次数: 16)
|