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:
- 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:
- 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.
[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.
[attachment=4957:StrangeBorders2.jpg]
Again, only when ran from the IDE.
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).