Jump to content

Recommended Posts

Posted (edited)

Hi All

It seems I'm struggling to find a solution here.

I have one Main GUI and 5 Child GUI without borders so it fits nicely within the main GUI.

If I select any of the Child GUI's I am able to move (drag them anywhere within the Main GUI.

I have tried all number of permatations in the CreateGUI ex-styles and GUICtrlSetState but none of the seem to work.

There is probably a very simple explanation and solution and if I had hair I would be pulling out right now.

Is there a way to stop this from being possible?

Many thanks in advance.

Edited by Iceman682
Posted (edited)

Look at this as an idea, basically intercept the WM_SYSCOMMAND and check the hWnd of the child GUIs, from there decide if you want to block movement (Return -1) or not.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
    Local $hGUI = GUICreate('WM_SYSCOMMAND')
    GUIRegisterMsg($WM_SYSCOMMAND, 'WM_SYSCOMMAND')
    GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

        EndSwitch
    WEnd
    GUIDelete($hGUI)
EndFunc   ;==>Example

Func WM_SYSCOMMAND($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $ilParam
    Local Const $SC_CLOSE = 0xF060, $SC_CONTEXTHELP = 0xF180, $SC_DEFAULT = 0xF160, $SC_HOTKEY = 0xF150, $SC_KEYMENU = 0xF100, $SC_MAXIMIZE = 0xF030, _
            $SC_MINIMIZE = 0xF020, $SC_MONITORPOWER = 0xF170, $SC_MOUSEMENU = 0xF090, $SC_MOVE = 0xF010, $SC_NEXTWINDOW = 0xF040, $SC_PREVWINDOW = 0xF050, $SC_RESTORE = 0xF120, _
            $SC_SCREENSAVE = 0xF140, $SC_SIZE = 0xF000, $SC_TASKLIST = 0xF130, $SC_VSCROLL = 0xF070

    Switch BitAND($iwParam, 0xFFF0)
        Case $SC_MOVE
            ConsoleWrite('WM_MOVE Detected' & @CRLF)

        Case $SC_SIZE
            ConsoleWrite('WM_SIZE Detected' & @CRLF)

        Case $SC_CLOSE
            ConsoleWrite('WM_CLOSE Intercepted' & @CRLF)
            ; Return -1

    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_SYSCOMMAND
Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

  • Moderators
Posted (edited)

Iceman682,

I show how to prevent child GUIs moving here. You need to look for the $SC_MOVE message with a WM_SYSCOMMAND handler and then ignore it. ;)

M23

Edit: As guinness has just pointed out above! :D

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

Oh dear it seems I spoke too soon :mad2:

This seems to stop the whole GUI from being moved also.

I'm just after stopping the Child GUI's from moving that is within the Main GUI

Any tips please?

  • Moderators
Posted

Iceman682,

Check the handle of the GUI sending the $SC_MOVE message and do not block it if it comes from the main GUI. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted (edited)

Any code to share? Seems you may have implemented it wrong.

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted

Sorry I should have posted this example yesterday >>

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
    Local $hGUI = GUICreate('WM_SYSCOMMAND')
    GUIRegisterMsg($WM_SYSCOMMAND, 'WM_SYSCOMMAND')
    GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

        EndSwitch
    WEnd
    GUIDelete($hGUI)
EndFunc   ;==>Example

Func WM_SYSCOMMAND($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $ilParam
    Local Const $SC_CLOSE = 0xF060, $SC_CONTEXTHELP = 0xF180, $SC_DEFAULT = 0xF160, $SC_HOTKEY = 0xF150, $SC_KEYMENU = 0xF100, $SC_MAXIMIZE = 0xF030, _
            $SC_MINIMIZE = 0xF020, $SC_MONITORPOWER = 0xF170, $SC_MOUSEMENU = 0xF090, $SC_MOVE = 0xF010, $SC_NEXTWINDOW = 0xF040, $SC_PREVWINDOW = 0xF050, $SC_RESTORE = 0xF120, _
            $SC_SCREENSAVE = 0xF140, $SC_SIZE = 0xF000, $SC_TASKLIST = 0xF130, $SC_VSCROLL = 0xF070

    Switch BitAND($iwParam, 0xFFF0)
        Case $SC_MOVE
            ; Check the handle to see if it matches the main GUI, if it doesn't then Return -1.
            ConsoleWrite('hWnd: ' & $hWnd & ', WM_MOVE Detected' & @CRLF)
            ; Return -1

        Case $SC_SIZE
            ConsoleWrite('hWnd: ' & $hWnd & ', WM_SIZE Detected' & @CRLF)

        Case $SC_CLOSE
            ConsoleWrite('hWnd: ' & $hWnd & ', WM_CLOSE Detected' & @CRLF)
            ; Return -1

    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_SYSCOMMAND

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted (edited)

Many thanks for your prompt replies.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $hGUI, $ssDescription, $WinOS, $InsDate, $ComputerDomain, $sADOUDescription, $sADDescription, $Whatever
Example()
Func Example()
$hGUI = GUICreate('WM_SYSCOMMAND', 625, 568)
GUIRegisterMsg($WM_SYSCOMMAND, 'WM_SYSCOMMAND')
GUISetBkColor(0xFFFFFF)
GUISetState(@SW_SHOW)
$MainMenuGUI = GUICreate("", 145, 678, 0, 0, $WS_CHILD, -1, $hGUI)
GUISetBkColor(0x87adfc)
GUISetState()
Global $Button0 = GUICtrlCreateButton("Button0", 15, 20, 122, 45)
Global $Button1 = GUICtrlCreateButton("Button1", 15, 62, 122, 45)
Global $Button2 = GUICtrlCreateButton("Button2", 15, 104, 122, 45)
Global $Button3 = GUICtrlCreateButton("Button3", 15, 146, 122, 45)
Global $Button4 = GUICtrlCreateButton("Button4", 15, 188, 122, 45)
Global $Button5 = GUICtrlCreateButton("Button5", 15, 230, 122, 45)
Global $Button6 = GUICtrlCreateButton("Button6", 15, 272, 122, 45)
GUISetState(@SW_SHOW)
_GUI1()
While 1
     Switch GUIGetMsg()
         Case $GUI_EVENT_CLOSE
             ExitLoop
     EndSwitch
WEnd
GUIDelete($hGUI)
EndFunc ;==>Example
; Child1 GUI
Func _GUI1()
$HomeGUI = GUICreate("", 490, 678, 145, 0, $WS_CHILD, $WS_TABSTOP, $hGUI)
GUISetBkColor(0xFFFFFF)
$Label1 = GUICtrlCreateLabel("Home GUI", 10, 10, 182, 33)
GUICtrlSetFont(-1, 18, 800, 0, "Arial")
$Label2 = GUICtrlCreateLabel("Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text ", 10, 50, 465, 14)
$Label3 = GUICtrlCreateLabel("Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text ", 10, 65, 452, 14)
$Label4 = GUICtrlCreateLabel("Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text", 10, 80, 250, 14)
$Label2 = GUICtrlCreateLabel("System Info", 10, 110, 209, 24)
GUICtrlSetFont(-1, 16, 800, 0, "Arial")
$Label5 = GUICtrlCreateLabel("User Account:", 10, 145, 250, 14)
Global $User = GUICtrlCreateLabel(@UserName, 170, 145, 270, 14)
GUICtrlSetColor(-1, 0x0000FF)
$Label6 = GUICtrlCreateLabel("Machine Service Tag:", 10, 170, 210, 14)
Global $ComputerToMove = GUICtrlCreateLabel(@ComputerName, 170, 170, 270, 14)
GUICtrlSetColor(-1, 0x0000FF)
$Label8 = GUICtrlCreateLabel("Computer Description:", 10, 195, 251, 14)
Global $DescriptionRefresh = GUICtrlCreateLabel($ssDescription, 170, 195, 270, 14)
GUICtrlSetColor(-1, 0xff0000) ; Red
$Label9 = GUICtrlCreateLabel("Computer Make and Model:", 10, 220, 251, 14)
Global $Label9a = ("The Product is a " & $Whatever)
Global $CompModel = GUICtrlCreateLabel($Label9a, 170, 220, 270, 14)
GUICtrlSetColor(-1, 0x0000FF)
$Label10 = GUICtrlCreateLabel("OS Version:", 10, 245, 251, 14)
Global $OSVer = GUICtrlCreateLabel($WinOS, 170, 245, 270, 14)
GUICtrlSetColor(-1, 0x0000FF)
$Label11 = GUICtrlCreateLabel("OS Install Date and Time:", 10, 270, 251, 14)
Global $InsDate1 = GUICtrlCreateLabel($InsDate, 170, 270, 270, 14)
GUICtrlSetColor(-1, 0x0000FF)
$Label12 = GUICtrlCreateLabel("IP Address:", 10, 295, 251, 14)
Global $IPAdress = GUICtrlCreateLabel(@IPAddress1, 170, 295, 270, 14)
GUICtrlSetColor(-1, 0x0000FF)
$DomainSummary = GUICtrlCreateLabel("Domain\Workgroup Summary", 10, 320, 253, 24)
GUICtrlSetFont(-1, 16, 800, 0, "Arial")
$Label7 = GUICtrlCreateLabel("Domain\Workgroup:", 10, 350, 253, 14)
Global $DomainorWorkgroup = GUICtrlCreateLabel($ComputerDomain, 170, 350, 270, 14)
GUICtrlSetColor(-1, 0x0000FF)
$Label8 = GUICtrlCreateLabel("AD Description:", 10, 375, 150, 14)
Global $Workgroup = GUICtrlCreateLabel($sADDescription, 170, 375, 200, 14)
GUICtrlSetColor(-1, 0xff0000) ; Red
Global $NoWorkgroup = GUICtrlCreateLabel("Information unavailable!", 170, 375, 400, 14)
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetState($NoWorkgroup, $GUI_HIDE)
$Label10a = GUICtrlCreateLabel("AD OU Description:", 10, 400, 253, 14)
Global $ADDescription = GUICtrlCreateLabel($sADOUDescription, 170, 400, 270, 14)
GUICtrlSetColor(-1, 0xff0000) ; Red
GUISetState(@SW_SHOW)
EndFunc ;==>HomeGUI
; Child2 GUI
; As above
Func _GUI2()
$hGUI2 = GUICreate("", 490, 678, 145, 0, $WS_CHILD, $WS_TABSTOP, $hGUI)
GUISetBkColor(0xFFFFFF)
EndFunc
; Child3 GUI
; As above
Func _GUI3()
$hGUI3 = GUICreate("", 490, 678, 145, 0, $WS_CHILD, $WS_TABSTOP, $hGUI)
GUISetBkColor(0xFFFFFF)
EndFunc
; Child4 GUI
; As above
Func _GUI4()
$hGUI4 = GUICreate("", 490, 678, 145, 0, $WS_CHILD, $WS_TABSTOP, $hGUI)
GUISetBkColor(0xFFFFFF)
EndFunc
;--------------------------------------------------------
;  Stops Child GUI from being dragged\moved
;--------------------------------------------------------
Func WM_SYSCOMMAND($hGUI, $iMsg, $iwParam, $ilParam)
#forceref $hGUI, $iMsg, $ilParam
Local Const $SC_CLOSE = 0xF060, $SC_CONTEXTHELP = 0xF180, $SC_DEFAULT = 0xF160, $SC_HOTKEY = 0xF150, $SC_KEYMENU = 0xF100, $SC_MAXIMIZE = 0xF030, _
         $SC_MINIMIZE = 0xF020, $SC_MONITORPOWER = 0xF170, $SC_MOUSEMENU = 0xF090, $SC_MOVE = 0xF010, $SC_NEXTWINDOW = 0xF040, $SC_PREVWINDOW = 0xF050, $SC_RESTORE = 0xF120, _
         $SC_SCREENSAVE = 0xF140, $SC_SIZE = 0xF000, $SC_TASKLIST = 0xF130, $SC_VSCROLL = 0xF070
Switch BitAND($iwParam, 0xFFF0)
     Case $SC_MOVE
         ; Check the handle to see if it matches the main GUI, if it doesn't then Return -1.
         ConsoleWrite('hWnd: ' & $hGUI & ', WM_MOVE Detected' & @CRLF)
         ; Return -1
     Case $SC_SIZE
         ConsoleWrite('hWnd: ' & $hGUI & ', WM_SIZE Detected' & @CRLF)
     Case $SC_CLOSE
         ConsoleWrite('hWnd: ' & $hGUI & ', WM_CLOSE Detected' & @CRLF)
         ; Return -1
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_SYSCOMMAND

I've tried it with and without the Return -1

Although the console results indicate there is a difference in the return, the child GUI moves within the Main GUI.

I think you are absolutly correct in that I'm doing it all wrong.

Edited by Iceman682
Posted

Don't declare Global variables inside functions.

An example for you:

#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>

Global $__hGUIMain = 0, $__hGUIChild = 0

Example()

Func Example()
    $__hGUIMain = GUICreate('WM_SYSCOMMAND')
    GUISetState(@SW_SHOW, $__hGUIMain)

    GUIRegisterMsg($WM_SYSCOMMAND, 'WM_SYSCOMMAND')

    $__hGUIChild = GUICreate('', 150, Default, 145, 0, $WS_CHILD, $WS_TABSTOP, $__hGUIMain)
    GUISetBkColor(0xFFF000)
    GUISetState(@SW_SHOW, $__hGUIChild)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

        EndSwitch
    WEnd

    GUIDelete($__hGUIChild)
    GUIDelete($__hGUIMain)
EndFunc   ;==>Example

Func WM_SYSCOMMAND($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $lParam
    Local Const $SC_CLOSE = 0xF060, $SC_CONTEXTHELP = 0xF180, $SC_DEFAULT = 0xF160, $SC_HOTKEY = 0xF150, $SC_KEYMENU = 0xF100, $SC_MAXIMIZE = 0xF030, _
            $SC_MINIMIZE = 0xF020, $SC_MONITORPOWER = 0xF170, $SC_MOUSEMENU = 0xF090, $SC_MOVE = 0xF010, $SC_NEXTWINDOW = 0xF040, $SC_PREVWINDOW = 0xF050, $SC_RESTORE = 0xF120, _
            $SC_SCREENSAVE = 0xF140, $SC_SIZE = 0xF000, $SC_TASKLIST = 0xF130, $SC_VSCROLL = 0xF070

    Switch BitAND($wParam, 0xFFF0)
        Case $SC_MOVE
            ; Check the handle to see if it matches the main GUI, if it doesn't then Return -1.
            If Not ($hWnd = $__hGUIMain) Then
                ConsoleWrite('hWnd: ' & $hWnd & ', WM_MOVE Detected' & @CRLF)
                Return -1
            EndIf

    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_SYSCOMMAND

Also why not use tabs instead? There are a couple of examples floating around especially one by Yashied.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted (edited)

Here is an idea of scrolling through 10 tab controls. Use the help file to understand a little further and good luck.

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#include <GUIConstantsEx.au3>
#include <GUITab.au3>

Example()

Func Example()
    Local $aArray[11] = [10], $iHeight = 500, $iIndex = 0, $iWidth = 500
    Local $hGUI = GUICreate('', $iWidth, $iHeight)

    Local $iBack = GUICtrlCreateButton('Back', $iWidth - 180, $iHeight - 30, 85, 25)
    Local $iNext = GUICtrlCreateButton('Next', $iWidth - 90, $iHeight - 30, 85, 25)

    Local $iTab = GUICtrlCreateTab(-99, -99, 0, 0) ; Create a Tab group.
    For $i = 1 To $aArray[0]
        $aArray[$i] = GUICtrlCreateTabItem($i)
        GUICtrlCreateLabel('Page ' & $i, 10, 10)
    Next
    GUICtrlCreateTabItem('') ; Close the Tab group.

    _Toggle_EnableOrDisable($iBack, 0) ; Disable the back button.

    GUISetState(@SW_SHOW, $hGUI)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

            Case $iBack
                If $iIndex = ($aArray[0] - 1) Then ; Enabled the next button if the index is currently at the maximum number of tabs minus 1.
                    _Toggle_EnableOrDisable($iNext, 1) ; Enable the next button.
                EndIf

                $iIndex -= 1 ; Decrease the item index.
                If $iIndex <= 0 Then ; Disable the back button if the index is less than the number of tab items.
                    $iIndex = 0
                    _Toggle_EnableOrDisable($iBack, 0) ; Disable the back button.
                EndIf
                _GUICtrlTab_SetCurFocus($iTab, $iIndex)

            Case $iNext
                $iIndex += 1 ; Increase the item index.
                If $iIndex = 1 Then
                    _Toggle_EnableOrDisable($iBack, 1) ; Enable the back button if the index is equal to 1.
                EndIf

                If $iIndex >= ($aArray[0] - 1) Then ; Disable the next button if the index is greater than the number of tab items minus 1.
                    $iIndex = ($aArray[0] - 1)
                    _Toggle_EnableOrDisable($iNext, 0) ; Disable the next button.
                EndIf
                _GUICtrlTab_SetCurFocus($iTab, $iIndex)

        EndSwitch
    WEnd
EndFunc   ;==>Example

Func _Toggle_EnableOrDisable($iControlID, $iOverride = -1) ; By guinness.
    Local $aState[2] = [$GUI_ENABLE, $GUI_DISABLE]
    If $iOverride > -1 Then
        $iOverride = Number(Not $iOverride)
    Else
        $iOverride = Number(BitAND(GUICtrlGetState($iControlID), $aState[0]) = $aState[0])
    EndIf
    GUICtrlSetState($iControlID, $aState[$iOverride])
EndFunc   ;==>_Toggle_EnableOrDisable
Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted

guinness

This is why I love this forum and Autoit, the support and guidance is second to none.

Outstanding Oh great one :thumbsup:

Thankyou very much, firstly for solving my dilema, secondly for pointing out my errors and thirdly for suggesting other possible routes to take. :dance:

Iceman682

Posted

You're welcome. Do take my advice with tabs instead of 10 GUIs.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted

Like this >>

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted

Aren't they just images? What about this as an idea?

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#include <GUIConstantsEx.au3>
#include <GUITab.au3>

Example()

Func Example()
    Local $iHeight = 500, $iWidth = 500
    Local $hGUI = GUICreate('', $iWidth, $iHeight)

    Local $iButtonbeginning = GUICtrlCreateButton('Finance', 10, 30, 85, 25)
    Local Const $iBeginningIndex = 0 ; This is the tab index value, starts from 0.

    Local $iButtonMiddle = GUICtrlCreateButton('Tax', 10, 55, 85, 25)
    Local Const $iMiddleIndex = 1 ; This is the tab index value.

    Local $iButtonend = GUICtrlCreateButton('Debt', 10, 80, 85, 25)
    Local Const $iEndIndex = 2 ; This is the tab index value.

    Local $iClose = GUICtrlCreateButton('Close', $iWidth - 90, $iHeight - 30, 85, 25)

    Local $iTab = GUICtrlCreateTab(-99, -99, 0, 0) ; Create a Tab group.

    ; Just create a loop of random labels for demonstration.
    Local Const $iBUTTON_MAX = 3
    For $i = 1 To $iBUTTON_MAX
        GUICtrlCreateTabItem($i)
        GUICtrlCreateLabel('Button__' & $i, 140, 30)
        GUICtrlCreateLabel('Label_Example__' & $i, 140, 60)
    Next

    GUICtrlCreateTabItem('') ; Close the Tab group.

    GUISetState(@SW_SHOW, $hGUI)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $iClose
                ExitLoop

            Case $iButtonbeginning
                _GUICtrlTab_SetCurFocus($iTab, $iBeginningIndex)

            Case $iButtonMiddle
                _GUICtrlTab_SetCurFocus($iTab, $iMiddleIndex)

            Case $iButtonend
                _GUICtrlTab_SetCurFocus($iTab, $iEndIndex)

        EndSwitch
    WEnd
EndFunc   ;==>Example

Note: You have all the ideas and tools now, so my advice is go out there and gives things a try.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted

You're welcome and good luck.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted

#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

Example() ; Example by GaryFrost.

Func Example()
    Local $hGUI = GUICreate('')
    
    GUICtrlCreateTab(5, 5, 390, 390, BitOR($TCS_MULTILINE, $TCS_VERTICAL)) ; Create a Tab group.
    GUICtrlCreateTabItem('Tab_1')
    GUICtrlCreateLabel('Tab_1', 35, 15)

    GUICtrlCreateTabItem('Tab_2')
    GUICtrlCreateLabel('Tab_2', 35, 15)

    GUICtrlCreateTabItem('Tab_3')
    GUICtrlCreateLabel('Tab_3', 35, 15)
    GUICtrlCreateTabItem('') ; Close the Tab group.

    GUISetState(@SW_SHOW, $hGUI)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

        EndSwitch
    WEnd
    GUIDelete($hGUI)
EndFunc   ;==>Example

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

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