解决方案 »
- [散分测试]研究RealICQ源代码完成并成功编译出成品
- 字符串比较问题
- 请帮忙看看该存储过程在编译时报错?急等ing...
- 改版后丢失的未解之迷:~~ 获取打印机的状态并控制打印机,问题解决必高分相送!!!
- 关于CGI
- sql查询的日期时间比较问题
- 请问:我想编一个简单的显示文本的程序,如果用dephi编的话,编出来的程序会有多大?能小于1M吗?我用VB编的话就很大,编出的程序是Windo
- DELPHI写的多人视频,各位老大多指教
- 操作文本文件的简单问题!赶紧来拿分!
- 急!query与updatesql一起使用出现的问题
- 加载数据量很大,怎么提高加载数据速度?
- “Access violation at address 74BD19A0” 咨询下74BD19A0这个什么意思?
program Project8;uses
ExceptionLog,
Forms,
frm_main in 'frm_main.pas' {FrmMain},
frm_Login in 'frm_Login.pas' {FrmLogin},
frm_QueryClose in 'frm_QueryClose.pas' {Form1};{$R *.res}begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TFrmMain, FrmMain);
// Application.CreateForm(TFrmLogin, FrmLogin);
// Application.CreateForm(TForm1, Form1);
Application.Run;
end.
//主窗体单元文件
unit frm_main;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;type
TFrmMain = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
private
procedure Login;
{ Private declarations }
public
{ Public declarations }
end;var
FrmMain: TFrmMain;implementation
uses frm_Login, frm_QueryClose;
{$R *.dfm}procedure TFrmMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
//选择 关闭 或 注销 的窗口
with TForm1.Create(self) do
try
if mb_ok = ShowModal then //关闭, 则程序退出
Application.Terminate; Login;
finally
free;
end;
end;procedure TFrmMain.Login;
begin
with TFrmLogin.Create(self) do
try
if mb_ok <> ShowModal then //登录失败后程序退出
Application.Terminate;
finally
free;
end;
end;procedure TFrmMain.FormCreate(Sender: TObject);
begin
Login;
end;end.