Reay = problem?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #71057
    Andreas
    Participant

    I coded a little tool. Nothing big. I set it to minimize in tray.

    When I restor4e it, everything works fine except the skinning.
    This seems to be broken. Some components continue skinned, some not, transparent labels have wite background… and when I just click on the form, the title bar skinning is away.

    Does anybody know ho to fix it? Repaint don’t work, seting sSkinManager inactive/active changed nothing.

    I hope I get any support from anyone.
    Much luck to the Developer.

    #71061
    Lasse
    Participant

    I think I had the same issue. I have done it this way:

    TMainForm = class(...
      ApplicationEvents: TApplicationEvents;
      TrayIcon: TTrayIcon;
      procedure ApplicationEventsMinimize(Sender: TObject);
      procedure TrayIconClick(Sender: TObject);
      procedure WMWindowStateNormal(var AMessage: TMessage); message WM_WINDOW_STATE_NORMAL;
      ...
    private
      procedure MinimizeToSystemTray;
    end;
    
    procedure TMainForm.ApplicationEventsMinimize(Sender: TObject);
    begin
      MinimizeToSystemTray;
    end;
    
    procedure TMainForm.MinimizeToSystemTray;
    begin
      if OptionsContainer.MinimizeToSystemTray then
      begin
        Hide;
        WindowState := wsMinimized;
        TrayIcon.Visible := True;
        TrayIcon.Animate := True;
      end;
    end;
    
    procedure TMainForm.TrayIconClick(Sender: TObject);
    begin
      TrayIcon.Visible := False;
      Show;
      WindowState := wsNormal;
      Application.BringToFront;
    end;
    
    procedure TMainForm.WMWindowStateNormal(var AMessage: TMessage);
    begin
      TrayIconClick(Self);
    end;
    #71062
    Andreas
    Participant

    Hey, thanks!

    With your code, it works like charme.
    Little bit I changed to fit with my project but you helped me very much.
    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.