AHK Gui - Redrawing the screen

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

AHK Gui - Redrawing the screen

Post by PuzzledGreatly » 08 Sep 2020, 00:03

I usually use movedraw to move gui controls as I'm usually moving one object over another. That works pretty well. Currently I have a project where one picture control is moving between two others (I' trying to create a boat sailing in the sea effect). I'm seeing a flash pretty often even when I'm not looping and redrawing the screen quickly. Is there any way to improve on movedraw or an additional command to reduce flashing? Thanks.
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: AHK Gui - Redrawing the screen

Post by tmplinshi » 08 Sep 2020, 00:38

Instead of using MoveDraw, use Move and DllCall("InvalidateRect", "ptr", ControlHwnd, "ptr", 0, "int", 0)
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

Re: AHK Gui - Redrawing the screen

Post by PuzzledGreatly » 08 Sep 2020, 02:34

Thanks for the idea. I tried it but in my case I still saw flashing.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: AHK Gui - Redrawing the screen

Post by BoBo » 08 Sep 2020, 02:56

AFAIK is member @Hellbent (alias CivReborn on YT) doing AHK game development too.
So he might be able to shed some light on this as well?! Good luck :)
User avatar
PuzzledGreatly
Posts: 1303
Joined: 29 Sep 2013, 22:18

Re: AHK Gui - Redrawing the screen

Post by PuzzledGreatly » 08 Sep 2020, 04:08

Thanks for the information, Bobo. So far I've seen one Hellbent's tutorial on YouTube featuring move but have yet to find a better answer to the flickering issue. I'll keep looking, though. I never thought of YouTube as AHK resource until now, cheers.
Post Reply

Return to “Ask for Help (v1)”