ExtendedBorders and TrayIcon

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #36084
    minou
    Participant

    I think that there is a mistake during the following procedure

    Code:
    TrayIcon1.Visible := False;
    Form1.Show;
    WindowState := wsNormal;
    Application.BringToFront();
    if ReadString_ini('setting','ClockStatus','1')='1'then
    AnalogClock1.Active:=True else AnalogClock1.Active:=False;

    Happens if not disable (sSkinManager1.ExtendedBorders)

    • version 8.41
    • Delphi XE3

    0imm.png

    After some changes became work

    uaz0.png

    #51734
    Stertor
    Participant

    Это не относится к вашей имеющейся проблеме, но посмотрите на этот:

    Code:
    if ReadString_ini('setting','ClockStatus','1')='1'then

    не лучше ли будет, эта функция была бы вызвана 1 раз – при старте/запуске приложения?

    Значение, которое вернет функция, будет сохранено в переменной, из которой потом может быть считано. Это сделает ваш код быстрее.

    #51771
    Support
    Keymaster

    Hello, minou

    I tried to repeat an issue, but without success.

    Could you give me a demo with this issue, please?

    #51793
    minou
    Participant

    now it is freezing

    Code:
    TrayIcon1.Visible:=False;
    Form1.Show;
    Application.BringToFront // << here
    #51794
    CheshireCat
    Participant

    Hello minou,

    please try this in your OnClick event:

    Code:

    procedure TForm1.TrayIcon1Click(Sender: TObject);
    begin
    TrayIcon1.Visible := False;
    Application.Restore;
    Application.BringToFront;
    Form1.Show;
    end;

    #51797
    minou
    Participant
    'CheshireCat' wrote:

    Hello minou,

    please try this in your OnClick event:

    Code:

    procedure TForm1.TrayIcon1Click(Sender: TObject);
    begin
    TrayIcon1.Visible := False;
    Application.Restore;
    Application.BringToFront;
    Form1.Show;
    end;

    work fine

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