I am using the code below to create a messagebox in Delphi 7. However I also have another form on screen who’s FormStyle is set to fsStayOnTop and the messagebox appears behind this form.
Is there any way to force the messagebox to appear in front?
if Application.MessageBox('Amessage here','Title', +MB_APPLMODAL + MB_ICONQUESTION + MB_YESNO) = IDNO then
Call
NormalizeTopMostsprior to showing the message box.(Hope it’s available in Delphi 7.)
Edit: Not sure about the downvote. If it hints in the direction that OP should use the native MessageBox function and set its parent HWND to the topmost window – I would agree. But maybe this is not possible for some reason.