Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of how to use a Picture Control as a Button
;http://ahkscript.org/boards/viewtopic.php?p=48057#p48057
#SingleInstance, On
#NoEnv
SetBatchLines, -1
#include mousey.ahk ;mousey library - http://ahkscript.org/boards/viewtopic.php?f=6&t=8352&p=48052#p48052
toggle := 0
gui, add, picture, h32 vIconButton hwndIconButton gtoggleicon icon45, shell32.dll
mouseycursor := mousey_init(IconButton,"hand")
gui, show
return
toggleicon:
if(toggle){
guicontrol,,IconButton, *icon45 shell32.dll
toggle := 0
}else{
guicontrol,,IconButton, *icon28 shell32.dll
toggle := 1
}
return
guiclose:
mousey_close(mouseycursor)
exitapp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.