Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Is it possible to hide the TGlows around the TLMDFloatingForm

We want to minimize all windows in out application some of which are "normal" windows to the user (they are parented to a TLMDFloatingForm/DockSite/DockPanel).  When we minimise the TLMDDockingForm we are left with the glow on the screen.  

At the moment the best workaround is to set the DockPAnel's PanelVisible property to false which hides the form and glow.  But we can longer make the form accessible on the TaskBar.

Thank you for your help in advance.

Richard

Comments

  • 4 Comments sorted by Votes Date Added
  • Hi,

    I don't exactly understand the structure of your application, because if you speak about simple floating forms, then they do not appear on task bar. Can you send a demo, which reproduce the problem, to our support email?
  • Hi Eugene,

    We want all of the floating windows to have a taskbar icon so we do the following in our form which is parented on the dock panel:

      SetWindowLong(Self.Parent{TLMDDockPanel}.Parent{TFloatingSite}.Parent{TLMDFloatingForm}.Handle, GWL_EXSTYLE, GetWindowLong(self.Parent.Parent.Parent.Handle, GWL_EXSTYLE) or WS_EX_APPWINDOW);

    With some experimentation a change to the following procedure seems to solve the problem (but I have not thoroughly tested all scenarios of hiding/showing etc). Instead of freeing/creating the TGlow objects perhaps they could be hidden and shown. This is not currently an ideal solution as we would prefer not to customise your source code.

    procedure TLMDFloatingForm.WMSize(var Message: TWMSize);
    begin
      inherited;
      if Message.SizeType = SIZE_MINIMIZED then
        FreeGlows
      else
      begin
        if Message.SizeType = SIZE_RESTORED then
          InitGlows;
        UpdateGlows;
      end;
    end;
  • Hi,

    This can be done simpler. Just take into account WindowState in TGlow.Update method:

    show := FForm.Visible and FForm.HandleAllocated and
              (FForm.WindowState <> wsMinimized) and
              (ff.BorderKind = fbCustom) and (bwd > 0) and (bhg > 0);

    I already incorporated this change for you...
  • Thank you Eugene, your solution works very well!
Sign In or Register to comment.