A transparent GUI window with a picture

Get help with using AutoHotkey and its commands and hotkeys
Noam527
Posts: 83
Joined: 08 Aug 2016, 17:20

A transparent GUI window with a picture

06 Jan 2017, 13:42

I'd like to make the background of a GUI window completely transparent, and then to add a picture on it (so basically, the only thing the window includes is a picture, not even a background color).
I couldn't come up with a result using 'WinSet, Transparent'. Help anyone?
Helgef
Posts: 4447
Joined: 17 Jul 2016, 01:02
Contact:

Re: A transparent GUI window with a picture

06 Jan 2017, 13:45

There's an option called Transcolor for winset, check it out.
hunter99
Posts: 128
Joined: 20 Jan 2014, 17:57

Re: A transparent GUI window with a picture

06 Jan 2017, 20:37

Hi Noam527,
Reading your request, it seems you just want the picture. If so you don't need Transparency, just a picture.
Try this.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory

;get a copy of CodeQuicktester by GeekDude from here:
;https://autohotkey.com/boards/viewtopic.php?f=6&t=6113

;==============================================================
; hunter99		1/6/17
;==============================================================
	Gui, Margin, 0, 0
	Gui, +AlwaysOnTop
	Gui, -Caption 		 ;no titlebar or boarder
								;put your own picture below. Though this one comes with most windows
	Gui, Add, Picture,  +0x6000000 gmoveit, C:\Users\Public\Pictures\Sample Pictures\Penguins.jpg 
	Gui, Show, AutoSize
	PostMessage, 0xA1, 2
return
	
esc::		;these will close the pictue
x::
	exitapp
return

moveit:					;the g label moveit lets you left click on pic to move it.
	PostMessage, 0xA1, 2,,, A				;Lets you drag the picture
return
good luck, hunter99

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], boiler, Chunjee, Google [Bot], NiptheZephyr, Sabestian Caine, Sefrautic, slupka, stuarty27 and 39 guests