Jump to content
Sign in to follow this  
ChaosUltima

Invisible Gui

Recommended Posts

ChaosUltima

Ok, anyone knows how to make in invisible GUI but all other features are visible? so you get a floating button and stuff like that.

either that, cuz im trying to make a button on a GUI with a picture covering it. As the button doesnt work if it is over the picture(bmp), then i need to make an invisible GUI, or does anyone know how to make a button work over another GUI object like a picture?

Share this post


Link to post
Share on other sites
ChrisL

someone on here made an online radio player, there GUI was transparent with a BMP file used for the background and controls floating on top.

The code they wrote is below, but you'll have to see if you can figure it out sorry I got to get on, I'm guessing its the $WS_EX_LAYERED option and the GUICtrlSetStyle($caption, -1, $WS_EX_TRANSPARENT)

GUICtrlSetStyle($caption, $DS_SETFOREGROUND) stuff..

Dim $s_TempFile
$bmp = _TempFile()
FileInstall("gui_2.bmp", $bmp)
$bmp2 = $bmp
#endregion set-skin
$caption = "Online Radio Jukebox"
$gui = GUICreate("Online Radio Jukebox", 230, 150, -1, -1, $WS_POPUP + $WS_SYSMENU + $WS_MINIMIZEBOX, $WS_EX_LAYERED)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
$caption = GUICtrlCreateLabel($caption, 12, 4, 180, 14)
GUICtrlSetStyle($caption, -1, $WS_EX_TRANSPARENT)
GUICtrlSetStyle($caption, $DS_SETFOREGROUND)
GUICtrlSetFont($caption, 9, 400, -1, "Arial Bold")
GUICtrlSetColor($caption, 0xffd700)
GUICtrlSetOnEvent($caption, "_Drag")
$min = GUICtrlCreateLabel("", 198, 4, 11, 11)
GUICtrlSetOnEvent($min, "Minimize")
GUICtrlSetTip($min, "Minimize")
$close = GUICtrlCreateLabel("", 210, 4, 11, 11)
GUICtrlSetOnEvent($close, "Close")
GUICtrlSetTip($close, "Close")
$combo_name = GUICtrlCreateCombo("Choose your RadioStation", 13, 30, 153, 90)
GUICtrlSetOnEvent(-1, "ComboEvent")
GUICtrlSetStyle(-1, -1, $WS_EX_TRANSPARENT)
GUICtrlSetData($combo_name, ReadStation())
$Volume = GUICtrlCreateSlider(13, 77, 152, 20)
GUICtrlSetStyle(-1, -1, $WS_EX_TRANSPARENT)
$VolLevel = $oMediaPlaySettings.Volume
GUICtrlSetData(-1, $VolLevel)
GUICtrlSetOnEvent(-1, "SliderEvent")
GUICtrlCreateLabel("Volume", 73, 62, 40, 20)
GUICtrlSetStyle(-1, -1, $WS_EX_TRANSPARENT)
GUICtrlSetColor(-1, 0xff)
$Play = GUICtrlCreateButton("Play", 175, 30, 45, 22)
GUICtrlSetStyle($Play, -1, $WS_EX_TRANSPARENT)
GUICtrlSetOnEvent($Play, "Play")
$Stop = GUICtrlCreateButton("Stop", 175, 55, 45, 22)
GUICtrlSetStyle($Stop, -1, $WS_EX_TRANSPARENT)
GUICtrlSetOnEvent($Stop, "Stop")
$Load = GUICtrlCreateButton("Load", 175, 80, 45, 22)
GUICtrlSetStyle($Load, -1, $WS_EX_TRANSPARENT)
GUICtrlSetOnEvent($Load, "Load")
$Add = GUICtrlCreateButton("Add", 50, 105, 45, 22)
GUICtrlSetStyle($Add, -1, $WS_EX_TRANSPARENT)
GUICtrlSetOnEvent($Add, "Add")
$Delete = GUICtrlCreateButton("Delete", 105, 105, 45, 22)
GUICtrlSetStyle($Delete, -1, $WS_EX_TRANSPARENT)
GUICtrlSetOnEvent($Delete, "Delete")
$pic = GUICtrlCreatePic($bmp, 0, 0, 230, 150)
GUICtrlSetOnEvent($pic, "_Drag")
$contextmenu = GUICtrlCreateContextMenu($pic)
$min_item = GUICtrlCreateMenuItem("Min", $contextmenu)
GUICtrlSetOnEvent($min_item, "Minimize")
$close_item = GUICtrlCreateMenuItem("Close", $contextmenu)
GUICtrlSetOnEvent($close_item, "Close")
GUICtrlCreateMenuItem("", $contextmenu)
$about_item = GUICtrlCreateMenuItem("About", $contextmenu)
GUICtrlSetOnEvent($about_item, "About")
$add_item = GUICtrlCreateMenuItem("Add", $contextmenu)
GUICtrlSetOnEvent($add_item, "Add")
$del_item = GUICtrlCreateMenuItem("Delete", $contextmenu)
GUICtrlSetOnEvent($add_item, "Delete")
#endregion GUICreate

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.