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:Handle
in this case would be the window handle of the stay on top form that's displaying theTColorDialog
. 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).