Jump to content

Transparent Button on top of an Image.


Recommended Posts

I am trying to figure out how to create a transparent button and place it on top of an image inside of a gui. I found one thread:

http://www.autoitscript.com/forum/index.ph...sparent+control

from almost two years ago and was wondering if anyone has anything new to try.

I just want to say that I have asked AutoIt to do many things and it has yet to let me down. :D Thank you to all the people who have helped me find answers to the numberous questions I have asked in this forum.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

I don't think I explained very well what I am attempting. I would like to create something of an image map.

An example would be to take an image of a keyboard and put it inside of a gui. Then create transparent buttons on top of the keys. That way, when you click on a key, the button would respond.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

Well, I can proudly say that my new _MouseHover and _PressDetect UDF's make this possible. You can just create images, and have them respond to hovering, being held down, and, of course, normal presses. Check it out and let me know whether it's what you're looking for or not :D

Alzo

Edited by marfdaman

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

Another way is to use embeded IE object control with your local HTML adress.

In that local HTML you can have images with image maps...

But will those images also respond to user hovering/pressing like a normal button?

Edit: if that's not required, you could simply put a transparent label on the places where you want your button, and the lables will respond to presses, eg. they show up in GuiGetMsg.

Edited by marfdaman

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

@marfdaman and @Zedna,

Thank you both for the very interesting solutions. I think I will try the simplest solution first to see if it meets my needs. I found this in the help file.

"The special flag $GUI_BKCOLOR_TRANSPARENT can be used with label and picture controls to give them a transparent background."

Maybe in the future $GUI_BKCOLOR_TRANSPARENT will be included with button controls when Gary and Holger work out the colored buttons. They have made some great progress.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...