zsleo 0 Posted June 17, 2022 I am using Delphi 11.1 Enterprise. I have an app that is now very commonly deployed and accessed though Windows RD Web. Often one of my forms “disappears” behind another for and the use thinks my application has hung because they cannot take control of the form that is displayed uppermost. There is a feature used by Microsoft to display the apps and sometime forms for each session as shown in the red box in Picture_1.png. The form types in my app are both modal and non-modal. Thanks in advance for your assistance Share this post Link to post
dummzeuch 1505 Posted June 17, 2022 So, what is your question? Do you want to know how to provide such a window list in your own application? Share this post Link to post
Fr0sT.Brutal 900 Posted June 17, 2022 Delphi form modality is a mess of triangle-wheeled bicycles, not mentioning the application structure itself (app's window is not main form!). Probably all you can do is some checks and SetForegroundWindow calls Share this post Link to post
Der schöne Günther 316 Posted June 17, 2022 (edited) Quote Often one of my forms “disappears” behind another for and the use thinks my application has hung because they cannot take control of the form that is displayed uppermost. Somehow reminds me of this... Source: xkcd: Troubleshooting Sorry for not being helpful. Sometimes, it really is a mess. Even the IDE itself sometimes manages to display modal windows behind itself and the only thing left for me to do is entirely kill it and start fresh. Edited June 17, 2022 by Der schöne Günther Share this post Link to post
PeterBelow 238 Posted June 17, 2022 7 hours ago, zsleo said: I am using Delphi 11.1 Enterprise. I have an app that is now very commonly deployed and accessed though Windows RD Web. Often one of my forms “disappears” behind another for and the use thinks my application has hung because they cannot take control of the form that is displayed uppermost. There is a feature used by Microsoft to display the apps and sometime forms for each session as shown in the red box in Picture_1.png. The form types in my app are both modal and non-modal. Make sure that all modal forms have PopupMode set to pmAuto and in the dpr file you have Application.MainformOnTaskbar := true; That avoids such isssues at least on classic Windows systems. I know nothing about Windows RD Web, though. Share this post Link to post
corneliusdavid 214 Posted June 17, 2022 One of the regular attendees of the Oregon Delphi User Group did a lot of research last summer on this very issue because he had the exact same problem you have. We were meeting virtually and actually recorded this particular meeting. You can view the recording and listen to his explanation and complete solution in the first 25 minutes of the video here: https://odug.org/2021-06 1 Share this post Link to post
zsleo 0 Posted June 17, 2022 12 hours ago, dummzeuch said: So, what is your question? Do you want to know how to provide such a window list in your own application? No. I want to know how to populate the window list as the RD Web environment. i.e in the same area as the red box Share this post Link to post
corneliusdavid 214 Posted June 17, 2022 27 minutes ago, zsleo said: No. I want to know how to populate the window list as the RD Web environment. i.e in the same area as the red box Sorry--my reply was totally off. I thought you wanted to solve the problem of windows getting stuck behind other windows. Share this post Link to post
zsleo 0 Posted June 17, 2022 7 hours ago, corneliusdavid said: One of the regular attendees of the Oregon Delphi User Group did a lot of research last summer on this very issue because he had the exact same problem you have. We were meeting virtually and actually recorded this particular meeting. You can view the recording and listen to his explanation and complete solution in the first 25 minutes of the video here: https://odug.org/2021-06 Thank you! I will definitely try this Share this post Link to post
zsleo 0 Posted June 17, 2022 9 minutes ago, corneliusdavid said: Sorry--my reply was totally off. I thought you wanted to solve the problem of windows getting stuck behind other windows. No need to apologise. That is my problem. My thought was to give the user a feature whereby they could see and select from a list of opened windows. Share this post Link to post
corneliusdavid 214 Posted June 17, 2022 1 minute ago, zsleo said: My thought was to give the user a feature whereby they could see and select from a list of opened windows. OK, good. I'm glad my suggestion might be useful. I know there's a way to present a list of windows as well (involves digging into Windows APIs and calling FindWindow if you don't build this list yourself) but I don't have a link ready to give you for that. I know I've seen blogs about how to do it in the past. Share this post Link to post