计算机应用 | 古代文学 | 市场营销 | 生命科学 | 交通物流 | 财务管理 | 历史学 | 毕业 | 哲学 | 政治 | 财税 | 经济 | 金融 | 审计 | 法学 | 护理学 | 国际经济与贸易
计算机软件 | 新闻传播 | 电子商务 | 土木工程 | 临床医学 | 旅游管理 | 建筑学 | 文学 | 化学 | 数学 | 物理 | 地理 | 理工 | 生命 | 文化 | 企业管理 | 电子信息工程
计算机网络 | 语言文学 | 信息安全 | 工程力学 | 工商管理 | 经济管理 | 计算机 | 机电 | 材料 | 医学 | 药学 | 会计 | 硕士 | 法律 | MBA
现当代文学 | 英美文学 | 通讯工程 | 网络工程 | 行政管理 | 公共管理 | 自动化 | 艺术 | 音乐 | 舞蹈 | 美术 | 本科 | 教育 | 英语 |

delphi源代码+可执行文件+考试系统(一)毕业(3)

2013-06-09 01:07
导读:Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var KaoShi1Form: TKaoShi1Form; implementation uses Kaishi,KaoShi2; {
Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  KaoShi1Form: TKaoShi1Form;

implementation
 uses Kaishi,KaoShi2;

{$R *.DFM}

procedure TKaoShi1Form.Button1Click(Sender: TObject);
begin
if trim(Edit1.text)='' then
  begin
  showmessage('请输入姓名');
  Edit1.SetFocus;
  end
else
  begin
  if MessageDlg('真的要开始考试吗?',mtConfirmation, [mbYes, mbNo], 0)
      = mrYes then
    begin
    KaiShiform.renming:=Edit1.Text;
    Application.CreateForm(TKaoshi2Form, Kaoshi2Form);
    KaoShi2Form.Show;
    KaoShi1Form.Release;
    end
  end;
end;

procedure TKaoShi1Form.FormCreate(Sender: TObject);
var i:byte;
begin
query1.DatabaseName:=kaishiform.AppPath;
Query1.SQL.Add('Select zu from 题库.db group by zu');
Query1.open;
i:=1;
if query1.RecordCount>0 then
 begin
 while i<=query1.RecordCount do
  begin
  combobox1.Items.Add(Query1.fieldbyname('zu').asstring);
  i:=i+1;
  query1.RecNo:=i;
  end;
 combobox1.Text:=trim( combobox1.Items.Strings[0]);
 end;
end;

end.

 

得分界面与代码设计实现
unit Defen;

interface

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

type
  TDeFenForm = class(TForm)
    Label1: TLabel;
    Label2: TLabel; (科教范文网 Lw.nsEAc.com编辑整理)
    renming: TListBox;
    defen: TListBox;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DeFenForm: TDeFenForm;

implementation
 uses kaishi;
{$R *.DFM}

procedure TDeFenForm.FormCreate(Sender: TObject);
begin
renming.Items.LoadFromFile(kaishiform.AppPath+'\rm.sav');
defen.Items.LoadFromFile(kaishiform.AppPath+'\df.sav');
end;

procedure TDeFenForm.Button1Click(Sender: TObject);
begin
renming.Items.Clear;
defen.Items.Clear;
renming.Items.SaveToFile(kaishiform.AppPath+'\rm.sav');
defen.Items.SaveToFile(kaishiform.AppPath+'\df.sav');
end;

end.

 

 


关于界面与代码设计实现

代码设计:
unit GuanYu;

interface

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

type
  TGuanYuForm = class(TForm)
    Label1: TLabel;
    Label3: TLabel;
    Label2: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label8: TLabel;
    Label9: TLabel;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  GuanYuForm: TGuanYuForm;

implementati

上一篇:delphi货运管理系统+access[开题报告+论文+源代 下一篇:delphi+sql办公自动化系统(+开题报告源程序+