How to reduce gui flickering?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
fabricio234
Posts: 122
Joined: 06 Mar 2020, 21:48

How to reduce gui flickering?

15 May 2021, 09:20

Code: Select all

+E0x02000000 +E0x00080000
Using the flags above does help a bit in pictures/gif, but when it's about tabs:

Code: Select all

gui, +E0x02000000 +E0x00080000
Gui, Add, Tab2,, General|View|Settings
Gui, Show
2021-05-15_12-27-20.gif
2021-05-15_12-27-20.gif (70.71 KiB) Viewed 1091 times
Last edited by fabricio234 on 15 May 2021, 10:27, edited 1 time in total.
fabricio234
Posts: 122
Joined: 06 Mar 2020, 21:48

Re: How to reduce gui flickering?

15 May 2021, 10:37

The first link suggests creating two guis, but I did not understand how you could "bind" both to move together.

The second link is about using guicontrol, would not help which tabs.

The third link is the option I'm already using.

Back to zero :(
fabricio234
Posts: 122
Joined: 06 Mar 2020, 21:48

Re: How to reduce gui flickering?

16 May 2021, 01:51

Drawing two GUIs and binding using SetParent reduced the flickering a lot in various controls, but when I use a GUI with the option -caption and minimize/restore, sometimes it displays a red caption:
2021-05-16_03-47-21.gif
2021-05-16_03-47-21.gif (45.74 KiB) Viewed 1059 times

Code: Select all

gui, 2:color,a9a7a0
gui, 2: +E0x02000000 +E0x00080000 +hwndHwndParent -caption
gui, 2:show, w200 h100,abc2

gui, +Parent2 +hwndHwndChild -caption
gui, 2:show, w200 h100,abc1
I noticed that this caption is from the GUI abc1:
vlc_2021-05-16_03-43-13.png
vlc_2021-05-16_03-43-13.png (7.32 KiB) Viewed 1059 times
:(
fabricio234
Posts: 122
Joined: 06 Mar 2020, 21:48

Re: How to reduce gui flickering?

18 May 2021, 06:32

Does someone know how i can hide this:
image.png
image.png (7.58 KiB) Viewed 1018 times
I noticed that this happens with any GUI that you create using -caption, just minimize/restore fast and it will be there

Code: Select all

gui -caption
gui,color,239829
gui,show,w200 h70
In this example, it shown a white title bar for a short
fabricio234
Posts: 122
Joined: 06 Mar 2020, 21:48

Re: How to reduce gui flickering?

08 Jun 2021, 04:30

I think --SYSMENU has hidden the minimize, maximize, close buttons.
Now missing just a white bar that appears when you minimize/restore.

It can be easily reproduced with the following code:

Code: Select all

gui -caption -sysmenu
gui,color,099785
gui,show,w200 h70
2021-06-08_06-26-11.gif
2021-06-08_06-26-11.gif (9.01 KiB) Viewed 969 times
Just minimize/restore and it will flash a white bar where's supposed to be the title bar.
Looking for some advice on how to get rid of it.
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: How to reduce gui flickering?

08 Jun 2021, 06:07

fabricio234 wrote:
08 Jun 2021, 04:30
I think --SYSMENU has hidden the minimize, maximize, close buttons.
Now missing just a white bar that appears when you minimize/restore.

It can be easily reproduced with the following code:
I'm not able to reproduce it in my Windows 10 system (has decent GPU).
What is your OS?
fabricio234
Posts: 122
Joined: 06 Mar 2020, 21:48

Re: How to reduce gui flickering?

08 Jun 2021, 15:08

Windows10, about gpu I have a gtx 1060.
While I was testing looks like this “white bar” only appears when the window under it had a black background (in the gif the background was vscode) :wtf:
Also try with the same color in the example, according to the color its hard to see it
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: How to reduce gui flickering?

08 Jun 2021, 16:17

DWM compositing is turned off for frameless windows and hence the flickering.
I'm not sure, but maybe handling WM_ERASEBKGND message could help.
Search our forum for examples.
fabricio234
Posts: 122
Joined: 06 Mar 2020, 21:48

Re: How to reduce gui flickering?

13 Jun 2021, 10:33

@SKAN i don't understand what you mean.

Can you try this example:

Code: Select all

W := 200 ,H := 100
Gui, 2: Color,0
Gui, 2: +E0x02000000 +E0x00080000 -Caption -SysMenu
Gui, 2: Show, w%w% h%h%,XXXXXXXXXXXXXXXXXXXXX

Gui, Color,0
Gui, +Parent2 -Caption -SysMenu
Gui, Show, w%w% h%h%, GUI

Return


When I minimize/restore it show the second gui title bar
Photoshop_2021-06-13_12-32-11.png
Photoshop_2021-06-13_12-32-11.png (4.52 KiB) Viewed 899 times
Trying to hide this :facepalm:
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: How to reduce gui flickering?

13 Jun 2021, 10:43

fabricio234 wrote:
13 Jun 2021, 10:33
When I minimize/restore it show the second gui title bar
I'm able to see it every time only if I remove +E0x02000000 +E0x00080000 from your code.
Otherwise, the flicker is well controlled.
fabricio234
Posts: 122
Joined: 06 Mar 2020, 21:48

Re: How to reduce gui flickering?

13 Jun 2021, 12:35

But i cant remove this two option, they are there to help reduce the flickering :(
No other way to hide this thing from being shown?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: coder96, Joey5 and 347 guests