⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coursemis.dpr

📁 Delphi数据库编程
💻 DPR
字号:
program CourseMIS;

uses
  Forms,
  SysUtils,
  Controls,
  FormMain in 'FormMain.pas' {frmMain},
  FormCourseManage in 'FormCourseManage.pas' {frmCourseManage},
  FormCourseArrange in 'FormCourseArrange.pas' {frmCourseArrange},
  FormCourseQuery in 'FormCourseQuery.pas' {frmCourseQuery},
  FormCourseClass in 'FormCourseClass.pas' {frmCourseClass},
  FormScoreManage in 'FormScoreManage.pas' {frmScoreManage},
  FormScoreStudent in 'FormScoreStudent.pas' {frmScoreStudent},
  FormScoreClass in 'FormScoreClass.pas' {frmScoreClass},
  FormUserManage in 'FormUserManage.pas' {frmUserManage},
  FormAbout in 'FormAbout.pas' {frmAbout},
  FormLogin in 'FormLogin.pas' {frmLogin};

{$R *.res}

function SQLConfigDataSource(
  hwndParent: Integer;
  fRequest: LongInt;
  lpszDriverString: string;
  lpszAttributes: string
  ): LongBool; stdcall; external 'ODBCCP32.DLL';

const
  ODBC_ADD_DSN = 1;
  ODBC_CONFIG_DSN = 2;
  ODBC_REMOVE_DSN = 3;
  ODBC_ADD_SYS_DSN = 4;
  ODBC_CONFIG_SYS_DSN = 5;
  ODBC_REMOVE_SYS_DSN = 6;

begin
  Application.Initialize;
  SQLConfigDataSource(0, ODBC_ADD_SYS_DSN,
    'Microsoft Access Driver (*.mdb)',
    'DSN=CourseMIS; DBQ='
    + ExtractFilePath(Application.ExeName)
    + 'CourseMIS.MDB; '
    + 'FIL=MS Access; '
    + 'MaxBufferSize=512; '
    + 'PageTimeout=5; '
    + 'Description=课程管理'
    );

  frmLogin := TfrmLogin.Create(Application);
  if frmLogin.ShowModal = mrOK then
  begin
    Application.CreateForm(TfrmMain, frmMain);
    Application.CreateForm(TfrmCourseManage, frmCourseManage);
    Application.CreateForm(TfrmCourseArrange, frmCourseArrange);
    Application.CreateForm(TfrmCourseQuery, frmCourseQuery);
    Application.CreateForm(TfrmCourseClass, frmCourseClass);
    Application.CreateForm(TfrmUserManage, frmUserManage);
    Application.CreateForm(TfrmScoreStudent, frmScoreStudent);
    Application.CreateForm(TfrmScoreClass, frmScoreClass);
    Application.CreateForm(TfrmUserManage, frmUserManage);
    Application.CreateForm(TfrmAbout, frmAbout);
    Application.CreateForm(TfrmScoreManage, frmScoreManage);
  end;
  Application.Run;
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -