Jump to content
Sign in to follow this  
Spikemg1

[Solved] Bottom Button whites out when hitting submit button.

Recommended Posts

The issue I am having is when user types in info and hits the submit button the bottom button on the parent GUI whites out. However you can still click the button and it works.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Date.au3>
#include <Array.au3>
#include <ComboConstants.au3>

#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", @DesktopWidth, @DesktopHeight,0 ,0 ,$WS_POPUP)
Global $AVEquipment1 = GUICtrlCreateButton("AV Equipment SignOut", 440, 40, 1035, 193)
GUICtrlSetFont(-1, 60, 800, 0, "@Microsoft YaHei")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x0000FF)
GUICtrlSetResizing(-1, 1)
Global $AVEquipment2 = GUICtrlCreateButton("AV Equipment Return", 440, 296, 1035, 193)
GUICtrlSetFont(-1, 60, 800, 0, "@Microsoft YaHei")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x0000FF)
GUICtrlSetResizing(-1, 1)
Global $ComputerRoom1 = GUICtrlCreateButton("Computer Room SignIn", 440, 544, 1035, 193)
GUICtrlSetFont(-1, 60, 800, 0, "@Microsoft YaHei")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xFF0000)
GUICtrlSetResizing(-1, 1)
Global $ComputerRoom2 = GUICtrlCreateButton("Computer Room SignOut", 441, 793, 1035, 193)
GUICtrlSetFont(-1, 60, 800, 0, "@Microsoft YaHei")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xFF0000)
GUICtrlSetResizing(-1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
    $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $AVEquipment1
                #Region ### START Koda GUI section ### Sign Out Equipment
                #Region ### START of Labels ###
                Global $CheckOut = GUICreate("Check Out AV Equipment", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetBkColor(-1, 0xFFFFFF)
                Global $Name = GUICtrlCreateLabel("Name", 150, 100, 200, 92)
                GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $Dept = GUICtrlCreateLabel("Department", 150, 300, 230, 92)
                GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $Contact = GUICtrlCreateLabel("Contact Phone #", 150, 500, 350, 92)
                GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $Comments = GUICtrlCreateLabel("Comments", 150, 700, 350, 92)
                GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $AVLaptop1 = GUICtrlCreateLabel("AV Laptop 1", 1000, 100, 400, 92)
                GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $AVLaptop2 = GUICtrlCreateLabel("AV Laptop 2", 1000, 200, 400, 92)
                GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $cPhone = GUICtrlCreateLabel("Confrence Phone", 1000, 300, 400, 92)
                GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $Projector = GUICtrlCreateLabel("Projector", 1000, 400, 298, 92)
                GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $InputN = GUICtrlCreateInput("", 300, 100, 500, 60, $ES_UPPERCASE)
                GUICtrlSetFont(-1, 30, 900, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $InputD = GUICtrlCreateInput("", 400, 300, 400, 60, $ES_UPPERCASE)
                GUICtrlSetFont(-1, 30, 900, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $InputC = GUICtrlCreateInput("", 500, 500, 300, 60, $ES_UPPERCASE)
                GUICtrlSetFont(-1, 30, 900, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $EditC = GUICtrlCreateEdit("", 375, 700, 425, 200, BitOR($ES_UPPERCASE, $ES_AUTOVSCROLL, $WS_VSCROLL))
                GUICtrlSetFont(-1, 30, 900, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                Global $Checkbox1 = GUICtrlCreateLabel("", 1400, 100, 80, 90, 0x1201)
                GUICtrlSetFont(-1, 75, 900, 0, "@Microsoft YaHei")
                GUICtrlSetBkColor(-1, 0xFFFFFF)
                GUICtrlSetResizing(-1, 1)
                Global $Checkbox2 = GUICtrlCreateLabel("", 1400, 200, 80, 90, 0x1201)
                GUICtrlSetFont(-1, 75, 900, 0, "@Microsoft YaHei")
                GUICtrlSetBkColor(-1, 0xFFFFFF)
                GUICtrlSetResizing(-1, 1)
                Global $Checkbox3 = GUICtrlCreateLabel("", 1400, 300, 80, 90, 0x1201)
                GUICtrlSetFont(-1, 75, 900, 0, "@Microsoft YaHei")
                GUICtrlSetBkColor(-1, 0xFFFFFF)
                GUICtrlSetResizing(-1, 1)
                Global $Checkbox4 = GUICtrlCreateLabel("", 1400, 400, 80, 90, 0x1201)
                GUICtrlSetFont(-1, 75, 900, 0, "@Microsoft YaHei")
                GUICtrlSetBkColor(-1, 0xFFFFFF)
                GUICtrlSetResizing(-1, 1)
                Global $Confirm = GUICtrlCreateButton("Confirm", 1256, 816, 291, 137)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetBkColor(-1, 0x00FF00)
                GUICtrlSetResizing(-1, 1)
                Global $OutHome = GUICtrlCreateButton("Home", 1552, 816, 291, 137)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetBkColor(-1, 0xFF0000)
                GUICtrlSetResizing(-1, 1)
                GUISetState(@SW_SHOW)
                #EndRegion ### END of Labels ###
                    While 1
                        $nMsg = GUIGetMsg()
                        Switch $nMsg
                            Case $Checkbox1
                                Switch GUICtrlRead($Checkbox1)
                                    Case ""
                                        GUICtrlSetData($Checkbox1, "X")
                                    Case Else
                                        GUICtrlSetData($Checkbox1, "")
                                EndSwitch

                            Case $Checkbox2
                                Switch GUICtrlRead($Checkbox2)
                                    Case ""
                                        GUICtrlSetData($Checkbox2, "X")
                                    Case Else
                                        GUICtrlSetData($Checkbox2, "")
                                EndSwitch

                            Case $Checkbox3
                                Switch GUICtrlRead($Checkbox3)
                                    Case ""
                                        GUICtrlSetData($Checkbox3, "X")
                                    Case Else
                                        GUICtrlSetData($Checkbox3, "")
                                EndSwitch

                            Case $Checkbox4
                                Switch GUICtrlRead($Checkbox4)
                                    Case ""
                                        GUICtrlSetData($Checkbox4, "X")
                                    Case Else
                                        GUICtrlSetData($Checkbox4, "")
                                EndSwitch

                            Case $Confirm
                                Global $RequireN = GUICtrlRead($InputN)
                                Global $RequireD = GUICtrlRead($InputD)
                                Global $RequireC = GUICtrlRead($InputC)

                                If $RequireN = '' Then
                                    MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                                ElseIf $RequireD = '' Then
                                    MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                                ElseIf $RequireC = '' Then
                                    MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                                Else
                                    Global $File = FileOpen(@ScriptDir & "\AV Equipment Sign IN & Out.txt", 1)
                                        FileWrite($File, _
                                            $RequireN & "," _
                                            & $RequireD & "," _
                                            & $RequireC & "," _
                                            & GUICtrlRead($Checkbox1) & "," _
                                            & GUICtrlRead($Checkbox2) & "," _
                                            & GUICtrlRead($Checkbox3) & "," _
                                            & GUICtrlRead($Checkbox4) & "," _
                                            & _NowDate() & "," _
                                            & _NowTime() & "," _
                                            & "X" & "," _
                                            & "X" & "," _
                                            & GUICtrlRead($EditC) & @CRLF)
                                        FileClose($File)
                                        GUIDelete()
                                        ExitLoop
                                        GUISwitch($Form1)
                                    EndIf

                            Case $OutHome
                                GUIDelete()
                                ExitLoop
                                GUISwitch($Form1)

                        EndSwitch
                    WEnd
                        #EndRegion ### END Koda GUI section ### Sign Out Equipment

                Case $AVEquipment2
                    #Region ### START Koda GUI section ### Returning Equipment
                    Global $Returning = GUICreate("Returning AV Equipment", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
                    GUICtrlSetResizing(-1, 1)
                    GUICtrlSetBkColor(-1, 0xFFFFFF)
                    GUICtrlSetResizing(-1, 1)
                    Global $Name2 = GUICtrlCreateLabel("Name", 150, 100, 200, 92)
                    GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $Dept2 = GUICtrlCreateLabel("Department", 150, 300, 230, 92)
                    GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $Contact2 = GUICtrlCreateLabel("Contact Phone #", 150, 500, 350, 92)
                    GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $Comments2 = GUICtrlCreateLabel("Comments", 150, 700, 350, 92)
                    GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $AVLaptop1B = GUICtrlCreateLabel("AV Laptop 1", 1000, 100, 400, 92)
                    GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $AVLaptop2B = GUICtrlCreateLabel("AV Laptop 2", 1000, 200, 400, 92)
                    GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $cPhone2 = GUICtrlCreateLabel("Confrence Phone", 1000, 300, 400, 92)
                    GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $Projector2 = GUICtrlCreateLabel("Projector", 1000, 400, 298, 92)
                    GUICtrlSetFont(-1, 30, 400, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $InputN2 = GUICtrlCreateInput("", 300, 100, 500, 60, $ES_UPPERCASE)
                    GUICtrlSetFont(-1, 30, 900, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $InputD2 = GUICtrlCreateInput("", 400, 300, 400, 60, $ES_UPPERCASE)
                    GUICtrlSetFont(-1, 30, 900, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $InputC2 = GUICtrlCreateInput("", 500, 500, 300, 60, $ES_UPPERCASE)
                    GUICtrlSetFont(-1, 30, 900, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $EditC2 = GUICtrlCreateEdit("", 375, 700, 425, 200, BitOR($ES_UPPERCASE, $ES_AUTOVSCROLL, $WS_VSCROLL))
                    GUICtrlSetFont(-1, 30, 900, 0, "@Microsoft YaHei")
                    GUICtrlSetResizing(-1, 1)
                    Global $Checkbox1B = GUICtrlCreateLabel("", 1400, 100, 80, 90, 0x1201)
                    GUICtrlSetFont(-1, 75, 900, 0, "@Microsoft YaHei")
                    GUICtrlSetBkColor(-1, 0xFFFFFF)
                    GUICtrlSetResizing(-1, 1)
                    Global $Checkbox2B = GUICtrlCreateLabel("", 1400, 200, 80, 90, 0x1201)
                    GUICtrlSetFont(-1, 75, 900, 0, "@Microsoft YaHei")
                    GUICtrlSetBkColor(-1, 0xFFFFFF)
                    GUICtrlSetResizing(-1, 1)
                    Global $Checkbox3B = GUICtrlCreateLabel("", 1400, 300, 80, 90, 0x1201)
                    GUICtrlSetFont(-1, 75, 900, 0, "@Microsoft YaHei")
                    GUICtrlSetBkColor(-1, 0xFFFFFF)
                    GUICtrlSetResizing(-1, 1)
                    Global $Checkbox4B = GUICtrlCreateLabel("", 1400, 400, 80, 90, 0x1201)
                    GUICtrlSetFont(-1, 75, 900, 0, "@Microsoft YaHei")
                    GUICtrlSetBkColor(-1, 0xFFFFFF)
                    GUICtrlSetResizing(-1, 1)
                    Global $Confirm2 = GUICtrlCreateButton("Confirm", 1256, 816, 291, 137)
                    GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                    GUICtrlSetBkColor(-1, 0x00FF00)
                    GUICtrlSetResizing(-1, 1)
                    Global $OutHome2 = GUICtrlCreateButton("Home", 1552, 816, 291, 137)
                    GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                    GUICtrlSetBkColor(-1, 0xFF0000)
                    GUICtrlSetResizing(-1, 1)
                    GUISetState(@SW_SHOW)

                    While 1
                        $nMsg = GUIGetMsg()
                        Switch $nMsg
                            Case $Checkbox1B
                                Switch GUICtrlRead($Checkbox1B)
                                    Case ""
                                        GUICtrlSetData($Checkbox1B, "X")
                                    Case Else
                                        GUICtrlSetData($Checkbox1B, "")
                                EndSwitch
                            Case $Checkbox2B
                                Switch GUICtrlRead($Checkbox2B)
                                    Case ""
                                        GUICtrlSetData($Checkbox2B, "X")
                                    Case Else
                                        GUICtrlSetData($Checkbox2B, "")
                                EndSwitch
                            Case $Checkbox3B
                                Switch GUICtrlRead($Checkbox3B)
                                    Case ""
                                        GUICtrlSetData($Checkbox3B, "X")
                                    Case Else
                                        GUICtrlSetData($Checkbox3B, "")
                                EndSwitch
                            Case $Checkbox4B
                                Switch GUICtrlRead($Checkbox4B)
                                    Case ""
                                        GUICtrlSetData($Checkbox4B, "X")
                                    Case Else
                                        GUICtrlSetData($Checkbox4B, "")
                                EndSwitch
                            Case $Confirm2
                                Global $RequireN2 = GUICtrlRead($InputN2)
                                Global $RequireD2 = GUICtrlRead($InputD2)
                                Global $RequireC2 = GUICtrlRead($InputC2)
                                    If $RequireN2 = '' Then
                                    MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                                ElseIf $RequireD2 = '' Then
                                    MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                                ElseIf $RequireC2 = '' Then
                                    MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                                Else
                                    Global $File2 = FileOpen(@ScriptDir & "\AV Equipment Sign IN & Out.txt", 1)
                                        FileWrite($File2, _
                                            $RequireN2 & "," _
                                            & $RequireD2 & "," _
                                            & $RequireC2 & "," _
                                            & GUICtrlRead($Checkbox1B) & "," _
                                            & GUICtrlRead($Checkbox2B) & "," _
                                            & GUICtrlRead($Checkbox3B) & "," _
                                            & GUICtrlRead($Checkbox4B) & "," _
                                            & "X" & "," _
                                            & "X" & "," _
                                            & _NowDate() & "," _
                                            & _NowTime() & "," _
                                            & GUICtrlRead($EditC2) & @CRLF)
                                        FileClose($File2)
                                        GUIDelete()
                                        GUISwitch($Form1)
                                    ExitLoop
                                EndIf

                            Case $OutHome2
                                GUIDelete()
                                ExitLoop
                                GUISwitch($Form1)

                        EndSwitch
                    WEnd
                    #EndRegion ### END Koda GUI section ### Returning Equipment


            Case $ComputerRoom1
                #Region ### START Koda GUI section ### Form=
                Global $ComputerRoomIn = GUICreate("Computer Room", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
                GUISetFont(28, 800, 0, "@Microsoft YaHei")
                Global $Label1 = GUICtrlCreateLabel("Name", 120, 88, 195, 90)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Input1 = GUICtrlCreateInput("", 352, 88, 841, 90, $ES_UPPERCASE)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Label2 = GUICtrlCreateLabel("Let in By", 120, 256, 282, 90)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Input2 = GUICtrlCreateInput("", 440, 248, 753, 90, $ES_UPPERCASE)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Label3 = GUICtrlCreateLabel("Reason for Entry", 120, 416, 540, 90)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Edit1 = GUICtrlCreateEdit("", 696, 408, 497, 265, $ES_UPPERCASE)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Submit = GUICtrlCreateButton("Submit", 1120, 824, 305, 129)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetBkColor(-1, 0x00FF00)
                Global $Home = GUICtrlCreateButton("Home", 1432, 824, 305, 129)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                GUICtrlSetBkColor(-1, 0xFF0000)
                GUISetState(@SW_SHOW)
                #EndRegion ### END Koda GUI section ###
                While 1
                    $nMsg = GUIGetMsg()
                    Switch $nMsg
                        Case $Submit
                            Global $RoomName = GUICtrlRead($Input1)
                            Global $Escort = GUICtrlRead($Input2)
                            Global $Reason = GUICtrlRead($Edit1)
                            If $RoomName = '' Then
                                MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                            ElseIf $Escort = '' Then
                                MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                            ElseIf $Reason = '' Then
                                MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                            Else
                                Global $File = FileOpen(@ScriptDir & "\IS Computer Room Log.txt", 1)
                                    FileWrite($File, _
                                        $RoomName & "," _
                                        & _NowDate() & "," _
                                        & _NowTime() & "," _
                                        & "X" & "," _
                                        & $Escort & "," _
                                        & $Reason & @CRLF)
                                    FileClose($File)
                                    GUIDelete()
                                    GUISwitch($Form1)
                                ExitLoop
                            EndIf
                        Case $Home
                            GUIDelete()
                            ExitLoop
                            GUISwitch($Form1)
                    EndSwitch
                WEnd
            Case $ComputerRoom2
                #Region ### START Koda GUI section ### Form=
                Global $ComputerRoomIn = GUICreate("Computer Room", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
                GUISetFont(28, 800, 0, "@Microsoft YaHei")
                Global $Label1 = GUICtrlCreateLabel("Name", 120, 88, 195, 90)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Input1 = GUICtrlCreateInput("", 352, 88, 841, 90, $ES_UPPERCASE)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Label2 = GUICtrlCreateLabel("Let in By", 120, 256, 282, 90)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Input2 = GUICtrlCreateInput("", 440, 248, 753, 90, $ES_UPPERCASE)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Label3 = GUICtrlCreateLabel("Reason for Entry", 120, 416, 540, 90)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Edit1 = GUICtrlCreateEdit("", 696, 408, 497, 265, $ES_UPPERCASE)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                Global $Submit = GUICtrlCreateButton("Submit", 1120, 824, 305, 129)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetBkColor(-1, 0x00FF00)
                Global $Home = GUICtrlCreateButton("Home", 1432, 824, 305, 129)
                GUICtrlSetFont(-1, 48, 800, 0, "@Microsoft YaHei")
                GUICtrlSetResizing(-1, 1)
                GUICtrlSetColor(-1, 0x000000)
                GUICtrlSetBkColor(-1, 0xFF0000)
                GUISetState(@SW_SHOW)
                #EndRegion ### END Koda GUI section ###
                While 1
                    $nMsg = GUIGetMsg()
                    Switch $nMsg
                        Case $Submit
                            Global $RoomName = GUICtrlRead($Input1)
                            Global $Escort = GUICtrlRead($Input2)
                            Global $Reason = GUICtrlRead($Edit1)
                            If $RoomName = '' Then
                                MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                            ElseIf $Escort = '' Then
                                MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                            ElseIf $Reason = '' Then
                                MsgBox(0, "Error", "PLEASE FILL IN ALL FIELDS.")
                            Else
                                Global $File = FileOpen(@ScriptDir & "\IS Computer Room Log.txt", 1)
                                    FileWrite($File, _
                                        $RoomName & "," _
                                        & _NowDate() & "," _
                                        & "X" & "," _
                                        & _NowTime() & "," _
                                        & $Escort & "," _
                                        & $Reason & @CRLF)
                                    FileClose($File)
                                    GUIDelete()
                                    ExitLoop
                                    GUISwitch($Form1)

                            EndIf
                        Case $Home
                            GUIDelete()
                            ExitLoop
                            GUISwitch($Form1)
                    EndSwitch
                WEnd
        EndSwitch
Wend

What its supposed to look like :

image.thumb.png.f0b18b55fb752901cdea8405288944b6.png

 

What it looks like after hitting submit:

 

image.thumb.png.af7661fe3dc604c84df65229e0678f1d.png

Edited by Spikemg1

Share this post


Link to post
Share on other sites
2 minutes ago, Subz said:

Works fine for me, have you tried it on other systems?

So far only on my pc which is a Windows 10. I have not tried on the tablet this is supposed to be working on yet.

Share this post


Link to post
Share on other sites

Spikemg1,

Seems to work correctly for me too on a couple of random trials. Can you tell us exactly what you do to get the effect - is it a particular user input sequence which causes the problem?

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

 

Share this post


Link to post
Share on other sites
6 minutes ago, Melba23 said:

Spikemg1,

Seems to work correctly for me too on a couple of random trials. Can you tell us exactly what you do to get the effect - is it a particular user input sequence which causes the problem?

M23

When I fill in every field in the AV Equipment SignOut the effect happens. Starting with Name, Department, Phone, Comments, then all check boxes top to bottom then hitting submit.

Share this post


Link to post
Share on other sites

Spikemg1,

I see the "whiteout" effect now - investigating.

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

 

Share this post


Link to post
Share on other sites

Spikemg1,

Got it!

Global $CheckOut = GUICreate("Check Out AV Equipment", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
GUICtrlSetResizing(-1, 1)
GUICtrlSetBkColor(-1, 0xFFFFFF)

When you create your secondary GUI, you are mistakenly using GUICtrlSet* commands - which obviously act on the last created control, in this case setting the final button to white.

Easy when you see it!

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

 

Share this post


Link to post
Share on other sites
2 minutes ago, Melba23 said:

Spikemg1,

Got it!

Global $CheckOut = GUICreate("Check Out AV Equipment", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP)
GUICtrlSetResizing(-1, 1)
GUICtrlSetBkColor(-1, 0xFFFFFF)

When you create your secondary GUI, you are mistakenly using GUICtrlSet* commands - which obviously act on the last created control, in this case setting the final button to white.

Easy when you see it!

M23

Yep, oops...... Nice find!!! Thanks for that!!!

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...