peter123 Posted July 18, 2007 Share Posted July 18, 2007 I don't know how I can make a sub menu for this code: $recentfilesmenu = GUICtrlCreateMenu ("Recent Files",$filemenu,1) the helpfile say this If @error <> 1 Then GUICtrlCreateMenuitem ($file,$recentfilesmenu) EndIf I don't get it :S Link to comment Share on other sites More sharing options...
ChrisL Posted July 18, 2007 Share Posted July 18, 2007 (edited) #include <GUIConstants.au3> $Form1 = GUICreate("Menu demo", 300, 200) $Filemenu = GUICtrlCreateMenu("File") $FileMenuItem1 =GUICtrlCreateMenuItem("Item 1",$Filemenu) ;a sub menu $FileMenu2 =GUICtrlCreateMenu("Menu2",$Filemenu) $FileMenuItem2 =GUICtrlCreateMenuItem("Menu2 Item 1",$Filemenu2) $FileMenuExit =GUICtrlCreateMenuItem("Exit",$Filemenu) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $FileMenuItem1 Msgbox(0 + 262144,"","item 1 clicked") Case $FileMenuExit Exit EndSwitch WEnd Edited to show 2 level menu Edited July 18, 2007 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now