Skinning problem in form caption

Viewing 20 posts - 1 through 20 (of 32 total)
  • Author
    Posts
  • #34619
    HeDiBo
    Participant

    In startup code, directly after the main form has been painted for the first time, I change the form's caption:

    Code:
    Self.Caption := strFormCap + Version_nr;

    This results in a distorted caption: [attachment=4908:SandBug.jpg] It should look like this: [attachment=4909:SandNoBug.jpg]

    Overwriting the caption seems to reset the skinning. Repainting the main form (for instance minimizing and restoring it) cures the defect.

    #46021
    Support
    Keymaster

    Hello

    Can this effect be reproduced in a new application?

    #46032
    HeDiBo
    Participant
    Quote:
    Can this effect be reproduced in a new application?

    Sure. Here it is:

    [attachment=4914:FormCaption.rar]

    If you set ExtendedBorders to True, the problem goes away.

    I'm working on Windows Vista, Vista themes enabled.

    #46050
    HeDiBo
    Participant

    'HeDiBo' wrote:
    Sure. Here it is:

    [attachment=4914:FormCaption.rar]

    If you set ExtendedBorders to True, the problem goes away.

    I'm working on Windows Vista, Vista themes enabled.

    Sorry to find it isn't solved in 7.44. 😡

    #46054
    Support
    Keymaster

    Hello

    I'm sorry, I hadn't a time for fixing because new version was in testing before release already.

    What I should to do in the demo? Just click a button? I don't see a described problem after the button click.

    #46055
    Support
    Keymaster

    Sometimes I see a blinking of the title after the button clicking. You meant this blinking?

    #46058
    HeDiBo
    Participant
    'Support' wrote:

    Sometimes I see a blinking of the title after the button clicking. You meant this blinking?

    The strangest thing :wacko: : the problem only manifests itself if the project runs under the Delphi IDE (I still use Delphi 7). If you run the program stand-alone, the problem disappears :a1: The problem can be seen in the first image of the original topic. It shows a form caption that is not skinned at all.

    I did some more testing and found that only if I build the test project without packages, then I get the problem but only when running in the IDE.

    Although this now turns out to be a corner case, it might point to a potential problem that will surface in some circumstances.

    #46116
    Support
    Keymaster
    'HeDiBo' wrote:
    I did some more testing and found that only if I build the test project without packages, then I get the problem but only when running in the IDE.

    You meant a using of the “Build with run-time packages” option?

    #46123
    HeDiBo
    Participant

    Yes. The Project option (Project – Options – Packages – Build with runtime packages).

    I could understand this somewhat, if the phenomena also occurred when running the app outside the IDE. Because I used Quality Central bug reports to edit the VCL. Those patches are not used when using runtime packages. But why does it go OK then outside the IDE?

    I'll send you, by separate mail, my version of Form.pas When you search the file for the string “qc” you'll find all the patches applied.

    #46130
    Support
    Keymaster

    Thank you for information, I will research a patched file that you sent to me.

    #46137
    HeDiBo
    Participant

    Remember: it's Delphi 7.

    #46111
    HeDiBo
    Participant
    'Support' wrote:

    Thank you for information, I will research a patched file that you sent to me.

    I was a bit stupid not to test this: if I remove all VCL patches that I made (all, not only those in Forms.pas) I have the same problem (now in 7.45 also).

    I did some more testing:

    • The bug is not related to a particular skin.
    • If you minimize the form and then restore it, the caption looks fine. But one click on the button and the problem is back.
    • Fiddling with the form size or the position of the button doesn't change anything.
    • Switching ExtendedBorders on, produces (mind you: only within the IDE) this effect:
    • [attachment=4956:StrangeBorders.jpg]

      It is removed by a task switch (it does not have to cover the form: as soon as the other task gets focus, the buggy effect is gone). The caption problem does not occur with ExtendedBorders = True. Most of the time the SkinProvider.TitleIcon is completely distorted.

    • Removing the TitleIcon altogether doesn't cure the caption problem.
    • Hiding scrollbars (Visible = False) does not change anything.
    • Setting Effects.AllowGlowing to False doesn't change anything.
    • Setting AnimEffects.FormHide.Active and AnimEffects.FormShow.Active to False doesn't change anything.
    • Setting AnimEffects.BlendOnMoving.Active to True doesn't seem to do anything at first: the wrongly painted caption simply moves in a blended way. However as soon as you release the mouse button, removing the blended effect, the caption paints OK. But a click of the button restores the old behavior.
    • SkinProvider.AllowAnimation to False doesn't help.
    • SkinProvider.DrawNonClientArea produces this:
    • [attachment=4957:StrangeBorders2.jpg]

      Again, only when ran from the IDE.

    • Setting SkinProvider.ShowAppIcon to False doesn't change anything.
    • Adding TitleButtons doesn't change anything.
    • Applying a nonstandard TitleSkin does not help either.
    • Setting SkinProvider.UseGlobalColor to False has no effect.

    So far the tests that I executed. Although it looks like a minor bug, it reveals a potential skinning problem, that will pop up in the future (thanks to Murphy's Law).

    #46171
    Support
    Keymaster

    Thank you for researching, I'll be thinking about that. 🙂

    #46389
    HeDiBo
    Participant

    And yes, the problem did pop up. Look at this topic.

    #46434
    Support
    Keymaster
    #46451
    HeDiBo
    Participant
    'Support' wrote:

    I'm not sure that your issue and DebugBreak problem are linked :

    And I'm not sure your answer has anything to do with this problem. Did you answer in the wrong topic?

    On my analysis earlier: the problem of the transparent window occurs if DrawNonClientArea = False.

    Greetings ;-}

    Dick

    #46452
    Support
    Keymaster
    'HeDiBo' wrote:
    And I'm not sure your answer has anything to do with this problem. Did you answer in the wrong topic?

    Sorry, I mean that this topic is not linked with topic about the DebugBreak problem (you are posted a link to this topic as to linked problem).

    I understand your issue from screenshots and I 'll try to reproduce it.

    Are you sure that latest version of skin used there?

    Maybe old version of skin is loaded when program is started from IDE?

    #46547
    HeDiBo
    Participant
    'Support' wrote:

    Sorry, I mean that this topic is not linked with topic about the DebugBreak problem (you are posted a link to this topic as to linked problem).

    Not so sure about that. The phenomena also occurs only when running in the IDE environment.

    'Support' wrote:

    Are you sure that latest version of skin used there?

    Maybe old version of skin is loaded when program is started from IDE?

    Latest version is used (7.48).

    Problem still present in AC 7.48

    #46590
    Support
    Keymaster

    These problems are really different, try attached file please.

    #46597
    HeDiBo
    Participant
    'Support' wrote:

    These problems are really different, try attached file please.

    I'll try it as soon as possible

    I'm on holiday now

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