About Gui image, text overlay problem Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
usnake
Posts: 9
Joined: 22 Sep 2022, 02:41

About Gui image, text overlay problem

Post by usnake » 10 Oct 2022, 02:36

Hi everyone, I'm trying to create a timer via ahk
My idea is to create a gui and make the gui transparent
add a background image to the gui
Then add a text to show the timer value
But my text will cause a part of the background image to become transparent as well
How can I fix this problem?
Snipaste_2022-10-10_15-36-23.png
Snipaste_2022-10-10_15-36-23.png (3.8 KiB) Viewed 414 times
I am a beginner and my code may have many imperfections, please advise me
Here is the code I wrote.

Code: Select all

Gui,Color,ff00ff
Gui +LastFound
WinSet, TransColor, ff00ff 255
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow 
Gui,Add,Picture,x0 y0 w71 h48,E:\EYES\timer2.bmp
Gui Font, s14 c0xFFFFFF, Arial
Gui Add, Text, x8 y10 , 00:00
Gui,Show,x0 y900

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

Re: About Gui image, text overlay problem

Post by mikeyww » 10 Oct 2022, 06:26

Hi,

You could try a different color, one that is not part of your background image. Red, yellow, etc.

User avatar
usnake
Posts: 9
Joined: 22 Sep 2022, 02:41

Re: About Gui image, text overlay problem

Post by usnake » 10 Oct 2022, 07:10

mikeyww wrote:
10 Oct 2022, 06:26
Hi,

You could try a different color, one that is not part of your background image. Red, yellow, etc.
I didn't set the background color of the text box, in fact I don't know where to set it, but it's the same color as Gui's background by default

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

Re: About Gui image, text overlay problem

Post by mikeyww » 10 Oct 2022, 07:31

Line 1 sets the color. You could try changing it (and the corresponding change on line 3).

User avatar
Hellbent
Posts: 2114
Joined: 23 Sep 2017, 13:34

Re: About Gui image, text overlay problem  Topic is solved

Post by Hellbent » 14 Oct 2022, 17:00

Add +BackgroundTrans to your text control.

Code: Select all

Gui Add, Text, x8 y10 +BackgroundTrans , 00:00

Post Reply

Return to “Ask for Help (v1)”