GUI from png, but text not transparent

Get help with using AutoHotkey and its commands and hotkeys
Navet
Posts: 1
Joined: 15 May 2019, 15:19

GUI from png, but text not transparent

15 May 2019, 15:33

Hello,

So I'm trying to do something that I think is quite basic but I can't get it done.

here is my code

I am using this image : http miam-images.m.i.pic.centerblog.net /94b4e48a.png Broken Link for safety

Code: Select all

myGui()
{
	Gui, mainGui:+LastFound -Caption +AlwaysOnTop
	Gui, mainGui:Color, 808080
	WinSet, TransColor, 808080
	gui, mainGui:add, picture, x0  y0 w400 h400, C:\Users\Navet\Desktop\poivron.png
	
	Menu, Tray, add, Show, reappear
	Menu, Tray, Default, Show
	Menu, Tray, Click, 1
	
	gui, mainGui:add, text, xm5 ym200 section, text that i want directly on the red of the pepper, not with a fully transparent background.
}
For the story, I am making this for a friends who hates pepper bells ^^

So my GUI is quite nicely rendered as a png, but I would like my text to be "backgroundless" so on top of the pepper bell, not fully background-transparent.

I'm struggling, thanks for helping.
Albireo
Posts: 784
Joined: 16 Oct 2013, 13:53

Re: GUI from png, but text not transparent

15 May 2019, 16:52

Welcome to AHK!
What do you want this instruction to do? Menu, Tray, add, Show, reappear
The AHK-manual for .: Menu Add
User avatar
Xtra
Posts: 1356
Joined: 02 Oct 2015, 12:15

Re: GUI from png, but text not transparent

15 May 2019, 18:14

Code: Select all

gui, mainGui:add, text, xm5 ym200 section BackgroundTrans, text that i want directly on the red of the pepper, not with a fully transparent background.
Controls: Uncommon Styles and Options

BackgroundTrans: Uses a transparent background, which allows any control that lies behind a Text, Picture, or GroupBox control to show through. For example, a transparent Text control displayed on top of a Picture control would make the text appear to be part of the picture. Use GuiControl +Background to remove this option later.

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot] and 156 guests