Board index » delphi » Delphi and Citrix

Delphi and Citrix


2004-07-24 12:41:41 AM
delphi189
Being new to Citrix use, we have been experiencing some Modal dialogs
"not really being modal" in Citrix. If dialogs are hidden or obscured
by another app or windows, this effectively makes an app "freeze" or
"hang" in the mind of the user. Don't know what to do about it.
Is this a problem with Citrix or Delphi on Citrix? If so, can this be
avoided by looking at Terminal Services in the latter Windows versions?
TIA
- Eduardo
I am not great, I am good. But good's not bad.
-- Fred Couples
Eminent Domain Software
"Custom Software Development For Your Domain"
Makers of EDSSpell, EDSPrint, EDSZipCodes and
XSpell, the IDE Expert.
 
 

Re:Delphi and Citrix

Eduardo A. Salgado writes:
Quote
Being new to Citrix use, we have been experiencing some Modal dialogs
"not really being modal" in Citrix.
Not sure about Citrix, but look for DisableWindowProcessGhosting. It
usually fixes that issue about modal dialogs.
--
Leonel
www.techtips.com.br
 

Re:Delphi and Citrix

This is what I was not aware of:
"When running seamlessly, some applications built using the Borland
development environment, such as Delphi, sometimes allowed the parent
window of a dialog box to go to the foreground, leaving no mechanism to
return the dialog box to the foreground.
"In a seamless session, the parent window can receive messages other
than mouse-oriented ones, like a focus change request from the ICA
Client. The parent window responds to the request and goes to the
foreground."
In the Citrix Knowledge base there is a fix that does not work
consistently for us.
Any of experienced this and has a good fix? Why is there the problem
with the Borland development environment?
BTW, I could not find any reference to "DisableWindowProcessGhosting".
- Eduardo
I am not great, I am good. But good's not bad.
-- Fred Couples
Eminent Domain Software
"Custom Software Development For Your Domain"
 

Re:Delphi and Citrix

Eduardo A. Salgado writes:
Quote
BTW, I could not find any reference to "DisableWindowProcessGhosting".
Sorry, that should actually be "DisableProcessWindowsGhosting":
The MSDN definition:
tinyurl.com/6f8zy
A thread about it:
tinyurl.com/44lwj
--
Leonel
www.techtips.com.br
"Any fool can write code that a computer can understand. Good
programmers write code that humans can understand." - Martin Fowler
 

Re:Delphi and Citrix

I have the same problem with Delphi and citrix.
It is really annoying and our customers {*word*75} about it all the time.
The problem only affects delphi apps, I made a test app in c# and it works
fine there.
The solution in the citrix KB does not work.
T
 

Re:Delphi and Citrix

Eduardo A. Salgado writes:
Quote
Being new to Citrix use, we have been experiencing some Modal dialogs
"not really being modal" in Citrix. If dialogs are hidden or obscured
by another app or windows, this effectively makes an app "freeze" or
"hang" in the mind of the user. Don't know what to do about it.

<snip>
TIA


- Eduardo
Eduardo,
Try the following, it moves the most recent modal dialog to the front of
any other application windows. Hook the method to the Application
OnActivate event.
// in mainform.create, or any other suitable place:
Application.OnActivate := Activated;
procedure TMainForm.Activated(Sender : TObject);
var
H : HWND;
begin
H := GetLastActivePopup(Application.Handle);
if H <>Application.Handle then
SetWindowPos(H, HWND_TOP, 0, 0, 0, 0,
SWP_NOMOVE or SWP_NOSIZE or SWP_SHOWWINDOW);
end;
HTH
John