zoel Posted May 27, 2019 Share Posted May 27, 2019 (edited) Hi people total noob here, I made this Gui with Koda, and I want to know how i can have a menu in the top of my Gui, also how to maximize the Gui, and finally how to make the input holder to maximize to the left as the parent Gui maximizes. Thanks in advance!! #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form2", 976, 418, 198, 139) $Input1 = GUICtrlCreateInput("", 232, 8, 737, 400) GUICtrlSetResizing(-1, $GUI_DOCKAUTO+$GUI_DOCKLEFT+$GUI_DOCKHEIGHT) $Button1 = GUICtrlCreateButton("Button1", 72, 40, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited May 27, 2019 by zoel Link to comment Share on other sites More sharing options...
Subz Posted May 27, 2019 Share Posted May 27, 2019 Basic example, look at the help file for more information: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= Local $aWndPos Local $hWnd = GUICreate("Form2", 900, 420, -1, -1, Default + $WS_MAXIMIZE) GUISetBkColor(0x333333) Local $idFilemenu = GUICtrlCreateMenu("&File") Local $idExititem = GUICtrlCreateMenuItem("Exit", $idFilemenu) Local $idInput = GUICtrlCreateInput("", 210, 10, 660, 360) GUICtrlSetResizing(-1, $GUI_DOCKBORDERS) Local $idButton = GUICtrlCreateButton("Button1", 10, 10, 190, 25) GUICtrlSetResizing(-1, BitOR($GUI_DOCKLEFT, $GUI_DOCKTOP, $GUI_DOCKWIDTH, $GUI_DOCKHEIGHT)) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MAXIMIZE ;~ Uncomment lines below if you wish to have the inputbox take up the entire window ;~ $aWndPos = WinGetPos($hWnd) ;~ GUICtrlSetPos($idInput, 11, 11, $aWndPos[2] - 54, $aWndPos[3] - 99) Case $idExititem Exit EndSwitch WEnd zoel 1 Link to comment Share on other sites More sharing options...
zoel Posted May 27, 2019 Author Share Posted May 27, 2019 Subz thank you very much my friend! Link to comment Share on other sites More sharing options...
Zedna Posted May 28, 2019 Share Posted May 28, 2019 Just note: You can create/design main/context/tray menu visually directly in Koda and it will generate AU3 code for you. Just place appropriate menu icon (from Koda's toolbar) on the form and doubleclick on it to populate visual menu editor. In Koda helpfile see section: Property editors/Menu builder Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
zoel Posted May 29, 2019 Author Share Posted May 29, 2019 Thank you Zedna 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