Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Thin clients and Delphi applications over Citrix

129 views
Skip to first unread message

Bernhard Roos

unread,
Nov 19, 2007, 4:14:37 AM11/19/07
to
Hello,
some of our customers have the following problem. With thin clients they
are working over Citrix with our application (which is on a Windows XP
machine). The thin client has linux.
Sometimes it happens that some modal windows are behind the Mainform.
This problem occurs only with thin clients and Citrix. Working direct
with our application it works perfectly.
Has somebody any ideas?
Best wishes
Bernhard

Vincent Bergeron

unread,
Nov 19, 2007, 12:44:20 PM11/19/07
to
Hi!

Try to disable the WindowsGhosting. Here's an example code.


procedure DisableProcessWindowsGhosting;
var
DisableProcessWindowsGhostingImp : procedure;
begin
@DisableProcessWindowsGhostingImp :=
GetProcAddress(GetModuleHandle('user32.dll'),
'DisableProcessWindowsGhosting');
if (@DisableProcessWindowsGhostingImp <> nil) then
DisableProcessWindowsGhostingImp;
end;


begin
// Disable Window Ghosting for the entire application.
DisableProcessWindowsGhosting;
Application.Initialize;
Application.Title := 'Hidden Dialog Test';
Application.CreateForm(TfrmMain, frmMain);
Application.Run;
end.

Peter Below (TeamB)

unread,
Nov 19, 2007, 11:45:59 AM11/19/07
to
Bernhard Roos wrote:

Which Delphi version are we talking about here?

To avoid Z-order problems as much as possible a modal form should
always use the currently active form as the API owner. How you achieve
that depends on the Delphi version you use. With the newer versions
(BDS 4 and up) you do it by setting Application.ModalPopupMode to
pmAuto (in the DPR file, before you create any forms) and by setting
your modal forms PopupMode to pmAuto as well. With this scheme to work
reliably you need to create the modal forms just before showing them
and destroy them again after they have been closed. With autocreated
forms used as modal forms you can run into situations where the last
owner form has died or changed its handle when you show the modal form
again.

--
Peter Below (TeamB)
Don't be a vampire (http://slash7.com/pages/vampires),
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com

Andreas Hausladen

unread,
Nov 19, 2007, 11:43:04 AM11/19/07
to
Depending on what your Delphi version is you can do

Delphi 2006, 2007:
Set the TForm.PopupMode and PopupParent properties

Delphi 5-2005:
Override TForm.CreateParams and set the Params.HwndParent field to the
main form' handle.


--
Regards,

Andreas Hausladen

0 new messages