Delphi TColorDialog打开了一个stayOnTop表单 [英] Delphi TColorDialog Opens behind a stayOnTop form
问题描述
在form3前面设置打开颜色对话框?
我正在使用D2009
谢谢
Delphi(D2007周围)介绍了一个重载的执行接受父窗口句柄作为参数的所有标准对话框的
方法。更改您的呼叫以显示对话框:
如果ColorDialog1.Execute(Handle)然后
begin
/ /做任何
结束;
句柄
在这种情况下将是窗口在顶部表单上显示 TColorDialog
的句柄。如果您正在从另一个窗口执行该对话框,则需要在顶部表单的句柄上传递保留。
文档是 here (XE版本,但仍适用于D2009)。
I have a main form (form1) that calls form2 which is a stayontop form. form2 calls a modal form (form3) which is also a stayontop form. when form3 modal form calls the colordialog, the color dialog opens behind form3.
What to set to open color dialog in front of form3?
I'm using D2009
thanks
Delphi (around D2007) introduced an overloaded Execute
methods for all of the standard dialogs that accept a parent window handle as a parameter. Change your call to display the dialog:
if ColorDialog1.Execute(Handle) then
begin
// Do whatever
end;
Handle
in this case would be the window handle of the stay on top form that's displaying the TColorDialog
. If you're executing the dialog from another window, you'll need to pass the stay on top form's handle instead.
The documentation is here (XE version, but it still applies to D2009).
这篇关于Delphi TColorDialog打开了一个stayOnTop表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!