代码设计:
unit piao_pas;
interface uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, DBCtrls; type
TForm2 = class(TForm) Button1: TButton; Label1: TLabel; Label2: TLabel; Label3: TLabel; riqi: TLabel; Label4: TLabel; xiang: TLabel; hao: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; leixing: TLabel; Label8: TLabel; Label9: TLabel; zhanm: TLabel; no: TLabel; etime: TLabel; jiage: TLabel;
procedure Button1Click(Sender: TObject); private
{ Private declarations } public
{ Public declarations } end; var
Form2: TForm2;
implementation
uses train_main;
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject); begin
form2.Close; end; end.
3.2 售票系统主界面的设计与实现
界面设计:
代码设计:
unit train_main; interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, ComCtrls, ToolWin, StdCtrls, Buttons, DB, ADODB, ExtCtrls,
Grids, DBGrids, DBCtrls, Mask, ActnList, DBActns; type
Tmain = class(TForm) MainMenu1: TMainMenu; N1: TMenuItem; N5: TMenuItem; N6: TMenuItem; N2: TMenuItem; N7: TMenuItem; N8: TMenuItem; N9: TMenuItem; N3: TMenuItem; N10: TMenuItem; N11: TMenuItem; N12: TMenuItem;
N4: TMenuItem; ToolBar1: TToolBar; BitBtn1: TBitBtn; ToolButton1: TToolButton; BitBtn2: TBitBtn; BitBtn3: TBitBtn; BitBtn4: TBitBtn; ToolButton2: TToolButton; ToolButton3: TToolButton; ToolBar2: TToolBar; BitBtn5: TBitBtn; BitBtn6: TBitBtn; BitBtn7: TBitBtn; BitBtn8: TBitBtn; BitBtn9: TBitBtn; ToolButton4: TToolButton; ToolButton5: TToolButton; ToolButton6: TToolButton; ToolButton7: TToolButton; login: TPanel;
DataSource1: TDataSource;
ADOConnection1: TADOConnection;