Reduce Flicker dramatically (Double Buffer)

Post your working scripts, libraries and tools for AHK v1.1 and older
djuga
Posts: 88
Joined: 28 Jul 2019, 08:16

Re: Reduce Flicker dramatically (Double Buffer)

Post by djuga » 14 May 2021, 10:19

But if gui have background image this way doesnt work! How make it with background image ???
My questions are baffling! :crazy:

guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: Reduce Flicker dramatically (Double Buffer)

Post by guest3456 » 14 May 2021, 10:44

nice trick


doubledave22
Posts: 343
Joined: 08 Jun 2019, 17:36

Re: Reduce Flicker dramatically (Double Buffer)

Post by doubledave22 » 28 May 2021, 10:33

Also having listview issues. Causing a pretty large cpu spike with the double buffer added on a GUI that contains a listview. Curious of any non-hacky fixes here

User avatar
elModo7
Posts: 217
Joined: 01 Sep 2017, 02:38
Location: Spain
Contact:

Re: Reduce Flicker dramatically (Double Buffer)

Post by elModo7 » 02 Jun 2021, 06:59

@djuga works well with background images too in my experience both with transparent pngs and normal images.
Maybe you want to try movedraw instead of move, but it's not always necessary.

User avatar
mprost
Posts: 8
Joined: 24 Dec 2018, 02:50

Re: Reduce Flicker dramatically (Double Buffer)

Post by mprost » 10 Aug 2021, 12:48

Thank you, thank you, thank you, I was about to port a GUI to Python just to avoid this problem and this simple line eliminated the flicker completely.

User avatar
Maestr0
Posts: 136
Joined: 05 Dec 2013, 17:43

Re: Reduce Flicker dramatically (Double Buffer)

Post by Maestr0 » 04 Jan 2022, 16:35

Awesome! This one line makes all the difference, thanks for sharing!

vanheartnet098
Posts: 61
Joined: 01 Sep 2020, 09:49

Re: Reduce Flicker dramatically (Double Buffer)

Post by vanheartnet098 » 17 Sep 2022, 10:49

@manehscripts
@hasantr
Did you find solution for this?

hasantr
Posts: 933
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Re: Reduce Flicker dramatically (Double Buffer)

Post by hasantr » 18 Sep 2022, 19:52

vanheartnet098 wrote:
17 Sep 2022, 10:49
@manehscripts
@hasantr
Did you find solution for this?
No, I don't think there is a solution available yet.

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Reduce Flicker dramatically (Double Buffer)

Post by malcev » 18 Sep 2022, 20:59

For listview You can use LVS_EX_DOUBLEBUFFER.

User avatar
elModo7
Posts: 217
Joined: 01 Sep 2017, 02:38
Location: Spain
Contact:

Re: Reduce Flicker dramatically (Double Buffer)

Post by elModo7 » 09 Dec 2022, 08:35

djuga wrote:
14 May 2021, 10:19
But if gui have background image this way doesnt work! How make it with background image ???
It does work with background images in my experience.

Here I have a background map image and I paint the player/enemy (another two different images) on top of it based on memory coordinates.
It's using this because it needs to be updated in between 30~60fps.

User avatar
WAZAAAAA
Posts: 88
Joined: 13 Jan 2015, 19:48

Re: Reduce Flicker dramatically (Double Buffer)

Post by WAZAAAAA » 25 Nov 2023, 16:39

Been struggling with flickering GUI from quickly updating GuiControl's for the longest time... added that 1 line, problem solved. Thank you good sir.
YOU'RE NOT ALEXANDER

Post Reply

Return to “Scripts and Functions (v1)”