Jump to content

Recommended Posts

Posted (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 by zoel
Posted

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

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...