Jump to content
zsleo

RDP and RD Web deployment of Delphi VCL apps

Recommended Posts

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
 

Picture_1.png

Share this post


Link to post

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

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
Posted (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...

troubleshooting.thumb.png.87cb5218d36eff4989df9d17eafa61c2.png

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 by Der schöne Günther

Share this post


Link to post
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

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

  • Thanks 1

Share this post


Link to post
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
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
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
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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×