Hi Group

Hi Group,
since we use XE2 we have the problem, that from time to time a modal form is behind the main window (from start or while using). This happens in programs but also in the ide. You can get that window in front with the windows-tab key.
Do anyone else have that issue. Or a solution for that?
Best regards
Bernd

Comments

  1. There were some VCL changes quite some time ago to handle change in Windows support. I think there is a PopupMode property or something like that...

    ReplyDelete
  2. We had this problem at work, seen more on Windows 7 (coming from Windows XP). Lucky for us, we had a base form class that the majority of the forms inherited from (should be all but that is another story).
    The work around was to override the base form's CreateParams method:

    procedure TBaseForm.CreateParams(var Params: TCreateParams);
    begin
      inherited;
      if (Assigned(Owner)) and
         (Owner <> Application) and
         (not Assigned(Self.Parent)) and
         (Self <> Application.MainForm) then
      begin
        Params.WndParent := TWinControl(Owner).Handle;
      end;
    end;

    ReplyDelete
  3. Thanks Nicolas, 
    your right. We also changed to win7 at that time. Because we also have a base class that is an easy solution. I will try it.
    Bernd

    ReplyDelete

Post a Comment