- This topic has 13 replies, 4 voices, and was last updated 10 years, 5 months ago by Schmidtze.
-
AuthorPosts
-
June 5, 2014 at 5:07 pm #36159SchmidtzeParticipant
Hello,
after activating or deactivating a window in my application, all toolbars (SpTbx) are flickering. As I have a lot of toolbars in my main window, it shows very ugly. This effect occurs for example when simply showing a message dialog in my application (and of course all other types of dialoges), but also when changing to another application and also when changing back. The problem only occurs with an activated SkinManager, so with deactivated Alpha Controls there's no problem.
Is there maybe an option which causes this problem?
Best regards
Friedemann
June 5, 2014 at 5:19 pm #51962SchmidtzeParticipantHere you can see it:
https://www.dropbox.com/s/yz4xwrswv855nns/flickering_toolbars.mp4
Please take a look at the toolbars. I think because of the video compression, it's not visible alyways in this clip when showing the dialog, but always when closing it. But in real life it occurs every time…
Regards
Friedemann
June 5, 2014 at 5:49 pm #51963SchmidtzeParticipantHello,
I just found out something for myself… In Line 6325 of sSkinProvider.pas (TsSkinProvider.AC_WMNCActivate) there are 2 lines of code:
Code:RedrawWindow(Form.Handle, nil, 0, {RDW_ALLCHILDREN or }RDW_INVALIDATE or RDW_UPDATENOW or RDW_NOERASE or RDW_FRAME);
// RedrawWindow(Form.Handle, nil, 0, RDW_ALLCHILDREN or RDW_INVALIDATE or RDW_UPDATENOW or RDW_NOERASE);The second one is commented out. If I change it, comment out the first one and reactivate the second one, it will be much better. There's still a light flickering visible but by far not as strong as with the other line. As I don't know the impact of these both lines, of course I will change it back to the official version.
Can I change maybe something in the toolbar component? This effect is only visible with SpTbx components.
Best regards
Friedemann
June 5, 2014 at 8:34 pm #51964molParticipantHi Friedemann
Does LockWindowUpdate(Form1.Handle) do the trick?
-Uwe
June 5, 2014 at 8:38 pm #51965SchmidtzeParticipantHi Uwe,
'mol' wrote:Does LockWindowUpdate(Form1.Handle) do the trick?
where do you think I should insert this?
BTW: It seems for me at the moment that this behaviour depends on the Windows version. On another system there's no flickering (I think Windows 7). I'm using Windows 8.1. I will check it tomorrow in my office. Very strange…
Regards
Friedemann
June 5, 2014 at 9:08 pm #51966molParticipantFriedemann,
'Schmidtze' wrote:where do you think I should insert this?
I would use the OnClick event of the toolbar item. Have you tried
{…}
SendMessage(Panel1.Handle, WM_SETREDRAW, 0, 0);
Open your dialog here
{…}
SendMessage(Panel1.Handle, WM_SETREDRAW, 1, 0);
RedrawWindow(Panel1.Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or RDW_ALLCHILDREN or RDW_NOINTERNALPAINT);
in that event already?
-Uwe
June 5, 2014 at 9:11 pm #51967SchmidtzeParticipantHi Uwe,
but then I have to lock a lot of panels always 😉 And it also occurs when switching to another application and back, always when the main form will be activated/deactivated.
Regards
Friedemann
June 5, 2014 at 9:47 pm #51968molParticipantHi Friedemann
'Schmidtze' wrote:but then I have to lock a lot of panels always
Just replace Panel1 with Form1, or you follow my advice from a few weeks ago and finally ditch SpTbx… 😀
-Uwe
June 7, 2014 at 7:27 am #51980SchmidtzeParticipantHi,
'mol' wrote:or you follow my advice from a few weeks ago and finally ditch SpTbx… 😀
NO! 😀 I will definitely not! It offers a lot features which I'm using and which aren't available in standard toolbar and menu. And I really hope to get this problem solved without ditching components…
Best regards
Friedemann
June 11, 2014 at 11:42 am #51984SupportKeymasterHello! What is version of used AlphaControls package?
June 15, 2014 at 4:43 pm #51995SchmidtzeParticipant'Support' wrote:Hello! What is version of used AlphaControls package?
oh, excuse me please, I didn't answer by now… I'm using v9.03 Beta.
Regards
Friedemann
June 20, 2014 at 10:29 am #52052VitiaMParticipantThank you for this advice !
June 22, 2014 at 7:30 am #52058SupportKeymasterHello!
Can you make a demo with flickering toolbar please? I'm trying to do that, but without success.
June 28, 2014 at 11:12 am #52097SchmidtzeParticipantHi,
'Support' wrote:Can you make a demo with flickering toolbar please? I'm trying to do that, but without success.
I've just send you an example project.
Best regards
Friedemann
-
AuthorPosts
- You must be logged in to reply to this topic.