- This topic has 14 replies, 3 voices, and was last updated 5 years, 8 months ago by Support.
-
AuthorPosts
-
March 9, 2019 at 6:20 pm #38188JM-DGParticipant
Latest version v14.18 hasn't been a good update for my project. :/
– Now most of my windows appear invisible when shown. (My windows have a windows borderStyle set to bsNone)
Exemples:
– Windows positionning, sizes & constraints are now inconsistent at run-time.
I use an ini files to remember width, height, top, left of my windows.
There were none of these problems last releases.
March 10, 2019 at 10:14 am #59209SupportKeymasterHello
Can you help me to repeat this issue?
I'm trying to make a test-app with such bug, but can't, unfortunately.
March 10, 2019 at 4:17 pm #59217JM-DGParticipant'Support' wrote:Hello
Can you help me to repeat this issue?
I'm trying to make a test-app with such bug, but can't, unfortunately.
I'll try to make a demo with the problem replicated. So far, no success.
Maybe caused by this recent change??: Solved issue with a form disappearing after showing.
March 12, 2019 at 12:13 pm #59223SupportKeymaster'JM-DG' wrote:Maybe caused by this recent change??I think, yes, this issue is linked with latest changes.
I need to know how to repeat the issue for fixing it.
March 13, 2019 at 2:00 am #59234JM-DGParticipant'Support' wrote:I think, yes, this issue is linked with latest changes.
I need to know how to repeat the issue for fixing it.
Hi!
I was able to reproduce the “Windows positionning, sizes & constraints are now inconsistent at run-time” problem I mentionned.
There's a 1 pixel increase in height every time I restart the application.
Also the constraint 170 does not seem to always stay true: I can resize down to 169 on first launch? When I first launch at => 172 the constraint seems to be back.
It may appear like not much, but in my application it is important that every windows sit tight at 170 + (n * 10) because I have a “snapping system” which makes the problem more apparent.
It was ok last version.
I have attached a simple demo.
As for the visibility problem, I'm still working on making a simple demo with the problem. (It's hard to reproduce on a new application but it happens on my main application every time)
March 13, 2019 at 7:39 am #59236SupportKeymasterThank you for the project. I have sent a patched file by private message, please try it.
March 13, 2019 at 11:42 am #59238JM-DGParticipant'Support' wrote:Thank you for the project. I have sent a patched file by private message, please try it.
The patch file you sent me seems to have fixed completely the “size” problem. :a7:
I'll try to find some time tonight to pin down the visibility problem remaining.
March 13, 2019 at 11:37 pm #59240JM-DGParticipantUpdate 1: When I comment out the usage of the procedure UpdateLayerVisibility() from sVclUtils.pas all the windows from my project behave correctly (visible).
Update 2:
It seems like the lines causing some of my windows not to draw are the one using the cflags constant in the UpdateLayerVisibility procedure.
Code:SetWindowPos(Handle, 0, 0, 0, WidthOf(R), HeightOf(R) – 1, cFlags);
SetWindowPos(Handle, 0, 0, 0, WidthOf(R), HeightOf(R) + 1, cFlags);When passing 0 as flag, the visibility of my windows are ok (but it fucks up positionning).
Code:SetWindowPos(Handle, 0, 0, 0, WidthOf(R), HeightOf(R) + 1, 0);Update 3: Yes!!!! Successfully reproduced the problem in a simple demo. Coming soon.
March 14, 2019 at 12:44 am #59241JM-DGParticipantTo reproduce:
Any new window with no constraints (minHeight or minWidth) & having a border set to bsNone.
If your mouse over the window, it will repaint itself.
March 14, 2019 at 1:00 am #59242TAZParticipantFor curiosity sake, I downloaded the project. I then ran JM's compiled exe and verified that the second window background is missing. You have to move the mouse over for it to show.
I then loaded the project into my Delphi IDE and compiled it. Then ran the exe from (1) the IDE and (2) as a stand alone and the problem did NOT occur. The second window background appeared when called.
Not sure if this helps.
Windows 7 Ultimate, Delphi 10.2.3, AC 14.18
March 14, 2019 at 1:17 am #59243JM-DGParticipant'TAZ' wrote:For curiosity sake, I downloaded the project. I then ran JM's compiled exe and verified that the second window background is missing. You have to move the mouse over for it to show.
I then loaded the project into my Delphi IDE and compiled it. Then ran the exe from (1) the IDE and (2) as a stand alone and the problem did NOT occur. The second window background appeared when called.
Not sure if this helps.
Windows 7 Ultimate, Delphi 10.2.3, AC 14.18
So it would be a Delphi7 problem only? <_<
March 14, 2019 at 1:24 am #59244TAZParticipantI have attached my exe. Did not change any code.
March 14, 2019 at 6:02 am #59245SupportKeymasterThanks for the demo.
The issue is not repeated with latest versions of the Delphi.
I will think how to improve it in the neareast release.
March 14, 2019 at 11:45 am #59248JM-DGParticipant'Support' wrote:Thanks for the demo.
The issue is not repeated with latest versions of the Delphi.
I will think how to improve it in the neareast release.
With some tests, I realised that it can be as simple as simply removing the “SWP_NOREDRAW” flag from the cFlags constant.
I dunno if it's a good solution though.
March 15, 2019 at 9:38 am #59253SupportKeymasterYes, I have found the same solution
-
AuthorPosts
- You must be logged in to reply to this topic.