请问一下大家都是怎么样设计登录窗口的.机制是怎么样.
一个MDI程序.
大家是把MDi窗口做为主窗口呢,还是把Login窗口做为主窗口呢.
我是把Login窗口做为主窗口,把确认后再创建MDI窗口,关显示.
最后隐藏login窗口,但总觉的不太好.大家有没有好的方法.
一个MDI程序.
大家是把MDi窗口做为主窗口呢,还是把Login窗口做为主窗口呢.
我是把Login窗口做为主窗口,把确认后再创建MDI窗口,关显示.
最后隐藏login窗口,但总觉的不太好.大家有没有好的方法.
解决方案 »
- Delphi 查询语句代码问题 求解决
- delphi编程中如何制作一个含有斜线表头的表格程序
- 50急求: 如何实现判断当前程序不运行,则1分种后,弹出登陆框!
- 在dll中加入datamodule问题!
- 大家看看我的ADOQUREY下的代碼有什么問題﹖怎么實現不了我要的效果﹖
- 如何通过WebBrower打开的网页中的连接来调用本程序的窗口
- 关于 EmbeddedWb 的Mshtml_tlb, SHDocVw_tlb 问题!
- 每题100分或100元!
- delphi编译成灰色的问题,不知道是不是哪弄错了,不能编译??
- 小弟头一次在csdn提问题,请各位大虾多多指教,一个简单的问题
- 初学Delphi
- 当不需要窗体时,怎么样把它去掉?
Forms, Sysutils,
frm_SMSset in 'frm_SMSset.pas' {frmSMSCXset},
pfStrings in '..\公共单元\pfStrings.pas',
DDPubfun in '..\公共单元\DDPubfun.pas',
frm_cxSQL in 'frm_cxSQL.pas' {frmCXSQL},
MainDataModule in '..\公共窗体单元\MainDataModule.pas' {Dm_Main: TDataModule},
UserLogin in '..\公共窗体单元\UserLogin.pas' {frm_SysLogin},
DataBaseSet in '..\组件单元\DataBaseSet.pas',
DataServerSet in '..\公共窗体单元\DataServerSet.pas' {frm_DataServerSet},
ChangeUserPass in '..\公共窗体单元\ChangeUserPass.pas' {frm_ChangeUserPass},
ConnMsg in '..\公共窗体单元\ConnMsg.pas' {frm_ConnMsg},
PubDBFunc in '..\公共单元\PubDBFunc.pas',
pubFunc in '..\公共单元\pubFunc.pas',
PubVardef in '..\公共单元\PubVardef.pas',
pubVarFun in '..\公共单元\pubVarFun.pas',
SQLDesiger in '..\SQL工具\SQLDesiger.pas' {frm_SQLDesiger},
frm_SMSMonitor in 'frm_SMSMonitor.pas' {frmSMSMonitor},
GSMControl3 in 'Pack\GSMControl3.pas',
xyDebug in 'Pack\xyDebug.pas',
xyPack in 'Pack\xyPack.pas',
xyPackThd in 'Pack\xypackthd.pas',
xyTypeConv in 'Pack\xyTypeConv.pas',
frm_RYXX in 'frm_RYXX.pas' {frmRYXX},
xStrGrid in '..\公共窗体单元\xStrGrid.pas',
frm_DDL in 'frm_DDL.pas' {frmDDLSet},
frm_RYSel in 'frm_RYSel.pas' {frmRYSel},
frm_DDLSel in 'frm_DDLSel.pas' {frmDDLSel},
frm_TJView in '..\统计视图\frm_TJView.pas' {frmTJView},
TjTabSel in '..\统计视图\TjTabSel.pas' {frm_TjTabSel},
about in '..\公共窗体单元\about.pas' {frm_about},
frm_Print in 'frm_Print.pas' {frmPrint},
frm_DXLOG in 'frm_DXLOG.pas' {frmDXLog},
frm_CXLog in 'frm_CXLog.pas' {frmCXLog},
frm_ExpTask in '..\导入导出\frm_ExpTask.pas' {frmExpTask},
frm_DDLCK in 'frm_DDLCK.pas' {frmDDLCK},
frm_Search in 'frm_Search.pas' {frm_SearchDBGrid},
frm_LogView in 'frm_LogView.pas' {frm_log},
xyNodeb in '..\表达式\xyNodeb.pas',
frm_DataExpImp in '..\导入导出\frm_DataExpImp.pas' {frmDataExpImp},
frm_DataExpAdd in '..\导入导出\frm_DataExpAdd.pas' {frmDataExpImpAdd},
frm_DataLink in '..\导入导出\frm_DataLink.pas' {frmDataLink};{$R *.RES}begin
Application.Initialize;
Application.Title := '短信查询监控';
Apppath := IncludeTrailingBackslash(ExtractFileDir(ParamStr(0))) ; helpPath := UpLevelDir(AppPath) + 'help\';
Application.CreateForm(TDm_Main, Dm_Main); pubDBConfig.Connected := false; if loginOK then
begin
if issysright(DDLGL,Pub_UserInfo.SysRight) then
begin
Application.CreateForm(TfrmSMSMonitor, frmSMSMonitor);
Application.Run;
end else
begin
showmsg(0,'你没有调度管理的权限.');
end;
end;
end.[loginok函数]function LoginOK: boolean;
begin
Try
frm_ConnMsg:= Tfrm_ConnMsg.Create(nil);
if assigned(frm_SysLogin) then
begin
frm_SysLogin.free;
frm_SysLogin := nil;
end;
frm_SysLogin := Tfrm_SysLogin.Create(nil);
frm_SysLogin.DataBase := dm_Main.DataBase1;
if frm_SysLogin.ShowModal = mrOK then
result := true
else result := false;
PubDatabaseName := 'RepData';
finally
FreeAndNil(frm_ConnMsg) ;
frm_SysLogin.free;
frm_SysLogin := nil;
end;
end;frm_SysLogin 是你用来验证用户名与口令窗体
Application.CreateForm(TDataModule1, DataModule1);
Application.CreateForm(TImportQueryGdsform, ImportQueryGdsform);
DataModule1.ADOConnection1.Connected:= false;
try
DataModule1.ADOConnection1.ConnectionString:= GetConnectionString;
DataModule1.ADOConnection1.Connected:= true;
except
on e:exception do
begin
MessageBox(Application.Handle,Pchar('数据库初始化设置错误,请与系统管理员联系!' + char(13) + string(e.Message)),'错误',MB_OK OR MB_ICONSTOP);
Exit;
end;
end; {打开登录窗口,根据用户权限进行登录}
try
UserLoginForm:= TUserLoginForm.Create(Application);
if UserLoginForm.ShowModal=100 then
Application.CreateForm(TMainform, Mainform)
else
Application.Terminate;
finally
UserLoginForm.Free;
UserLoginForm:= nil;
end;
{运行应用程序}
Application.Run;
login := TLogin.create(nil);
if Login.showmodal= mrok then
ApplicationRunfinaly
login.free;
end;
MDI程序是不是也可以不用MDI窗口做主窗口的.就是在project-option中的设置