GuiControl, hide, but then can't show again

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
clarkj0388
Posts: 13
Joined: 11 Aug 2022, 18:50

GuiControl, hide, but then can't show again

Post by clarkj0388 » 10 Mar 2023, 17:55

I'm just trying to create a gui that flips between two pictures quickly... if I use GuiControl to change the pic, it creates the dreaded flicker.

Instead I tried layering two images, and wanted to just hide and show the top image over and over again. It creates no flicker which is great, but once I hide one control, it won't show again...

I'm confused.

Code: Select all

StopSong:
Gui, SS:New, -Caption -DPIScale,
Gui, SS:+AlwaysOnTop
Gui, SS: Margin, 0, 0
Gui, SS: Color, White
Gui, SS: Add, Picture, vPicY x0 y0 w1920 h1080, vn_y.png
Gui, SS: Add, Picture, vPicW x0 y0 w1920 h1080, vn_w.png
Gui, SS: Show, x0 y0 w1920 h1080, StopSong


Sleep 1000

VarSleep = 200


Sleep %VarSleep%
GuiControl, SS:, PicW, hide
Sleep %VarSleep%
GuiControl, SS:, PicW, show





Sleep 500

		


exitapp

User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: GuiControl, hide, but then can't show again

Post by mikeyww » 10 Mar 2023, 20:19

Hello,

You cannot make up your own syntax. Use what is provided. https://www.autohotkey.com/docs/v1/lib/GuiControl.htm#Hide

Post Reply

Return to “Ask for Help (v1)”