【发布时间】:2010-06-15 12:36:01
【问题描述】:
我创建了两个应用程序 MainApps 和 SubApps,SubApps 有一个模态类型对话框,例如登录/注销表单等,并且工作正常。
在我将它附加到 MainApps 后,模态对话框显示为正常的框形式。它的行为类似于“DIALOG.SHOW”而不是“DIALOG.SHOWMODAL”;
我正在使用delphi编译器
子应用按钮点击;
begin
with TfrmDialog.Create(Self, dtLogout) do
try
iMsgResult := ShowModal;
finally
Free;
end;
if iMsgResult = mrOk then
begin
dmVoca.FHomeworkXMLDoc.Active := False;
//Disabled Double Login
dmVoca.tmrDoubleLogin.Enabled := False;
................
end;
end;
MainApps 按钮单击
begin
setparent(findwindow(nil,'SubApps'),TabSheet1.Handle);
.........
end;
【问题讨论】:
-
您能提供更多信息吗?也许一些代码 sn-ps 以及您正在使用的 Delphi 版本?
-
好的,看看..我想知道什么问题。我疯了!
-
@Warren P,我用的是delphi7/delphi2009
标签: delphi forms modal-dialog dialog setparent