Jump to content

Recommended Posts

Posted

Hi All,

Is it possible to create a link, using GUICtrlCreateIcon, that can execute a command when clicked?

HeidiR

HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/
Posted

#include <GUIConstants.au3>

$hGUI = GUICreate("Test GUI")
$icon = GUICtrlCreateIcon("shell32.dll", 4, 20, 20)

GUISetState()


While 1
    $iMsg = GUIGetMsg()
    Select
        Case $iMsg = $icon
            ShellExecute("http://www.autoitscript.com/forum")
        Case $iMsg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
Wend

Posted

#include <GUIConstants.au3>

$hGUI = GUICreate("Test GUI")
$icon = GUICtrlCreateIcon("shell32.dll", 4, 20, 20)

GUISetState()


While 1
    $iMsg = GUIGetMsg()
    Select
        Case $iMsg = $icon
            ShellExecute("http://www.autoitscript.com/forum")
        Case $iMsg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
Wend

Perfect! Thanks for your help.

HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/

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
×
×
  • Create New...