PictureButton Rollover effect - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7) +---- Thread: PictureButton Rollover effect (/showthread.php?tid=3139) |
PictureButton Rollover effect - TempodiBasic - 10-19-2024 Hi friends here a simple demo to get a picturebutton with rollover effect Code: (Select All)
please download the attached image or use another of your choice. In this second case, please change the name and path of the image to load with _LOADIMAGE. then copy and paste this code into QB64IDE and save it in the same folder of the image downloaded or choosen by you. At the end press F5 and see the result. RE: PictureButton Rollover effect - Pete - 10-19-2024 +1 for using TheBOB's QB64 logo design! Pete RE: PictureButton Rollover effect - TempodiBasic - 10-21-2024 (10-19-2024, 04:22 AM)Pete Wrote: +1 for using TheBOB's QB64 logo design! RE: PictureButton Rollover effect - mdijkens - 10-22-2024 For screens with a lot of controls/buttons with click/hover/rollover effect I've used the alpha channel a lot to detect if the mouse was over a certain area. You can make your controls alpha-color &HFE and downwards and then check with _Alpha32(Point(_mouseX,_mouseY)) for the alpha value... RE: PictureButton Rollover effect - TempodiBasic - 10-24-2024 (10-22-2024, 10:55 AM)mdijkens Wrote: For screens with a lot of controls/buttons with click/hover/rollover effect I've used the alpha channel a lot to detect if the mouse was over a certain area. this is a good trick! Using the information brought by memory screen for evaluating the position of an object on the screen from its graphic rappresentation. (Using the screen as a map!) it implies that alpha channel is exclusive for specific graphic areas. |