Jump to content

GUI menu help


Recommended Posts

I want to make a menu with icons. What am I doing wrong in the next code:

#include <GUIConstants.au3>
GUICreate("Title",500,300)
 $EditMenu      = GUICtrlCreateMenu('&Edit')
 $PrefsItem     = GUICtrlCreateMenuItem('Preferences', $EditMenu, 'shell32.dll', 21)
 $FavItem       = GUICtrlCreateMenuItem('Favorites', $EditMenu, 'shell32.dll', 43)
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    EndSelect
WEnd

I don't really get it how to use what Holger did here: http://www.autoitscript.com/forum/index.ph...=20967&st=0

Link to comment
Share on other sites

Credit goes to Holger

thanks to Holger for the greate job

this is your example

#include <Menu_Icons.au3>
                GUICreate("Test",150,100)
 $EditMenu  =   GUICtrlCreateMenu('&Menu')
 $ss        =   MY_GUICtrlCreateMenu ("Settings" , $EditMenu, "shell32.dll" , 165)
 $panel     =   MY_GUICtrlCreateMenuItem('Control Panel', $ss, 'shell32.dll', 216)
 $Desk      =   MY_GUICtrlCreateMenuItem('Desktop Display Settings', $ss, 'shell32.dll', 140)
 $Forums    =   MY_GUICtrlCreateMenuItem('AutoIt Forums', $EditMenu, 'shell32.dll', 43)
 $exit      =   MY_GUICtrlCreateMenuItem ("Exit" , $EditMenu , "shell32.dll" , 215)
 
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $exit
        Exit
    Case $msg = $panel
        Run ("control.exe")
    Case $msg = $Desk
        Run ("control.exe desk.cpl")
    Case $msg = $Forums
        ShellExecute ("http://www.autoitscript.com/forum/index.php?")
    EndSelect
WEnd

Don't forget to put attachment files in the Include Dir

Edited by star2

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

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...