Sign in to follow this  
Followers 0
sambalec

I need a new GUI window to change parameters...

3 posts in this topic

Hello, I use a GUI but through this GUI, i need a new GUI window when I click on parameters... Can you help me :D

CODE
Opt("TrayMenuMode",1)

GUICreate ("SecureMyWeb - Admin", 180, 100)

$Button = GuiCtrlCreateButton ("Quitter", 20, 50 , 50, 30)

$Button2 = GuiCtrlCreateButton ("Paramètres", 90, 50 , 70, 30)

GUISetState ()

While 1

$boucle_menu = GUIGetMsg ( )

Select

Case $boucle_menu = $Button

$PassBox = InputBox ("Arrêter la sécurité", "Entrez votre mot de passe :", "", "*M")

If $PassBox = "password" Then

sleep(500)

Exit

Else

MsgBox (48, "Erreur", "Mot de passe erroné !")

EndIf

EndSelect

Select

Case $boucle_menu = $Button2

;;;; i need a new GUI window to change parameters... ;;;

GUICreate ("SecureMyWeb - Administration", 300, 300) ;; Doesn't work

EndSelect

wend

Share this post


Link to post
Share on other sites



I found, it's good :D

Share this post


Link to post
Share on other sites

Opt("TrayMenuMode", 1)

$hGUIMain = GUICreate("SecureMyWeb - Admin", 180, 100)
$Button = GUICtrlCreateButton("Quitter", 20, 50, 50, 30)
$Button2 = GUICtrlCreateButton("Paramètres", 90, 50, 70, 30)
GUISetState()



While 1
    $boucle_menu = GUIGetMsg()
    Select
        Case $boucle_menu = $Button
            $PassBox = InputBox("Arrêter la sécurité", "Entrez votre mot de passe :", "", "*M")
            If $PassBox = "password" Then
                Sleep(500)
                Exit
            Else
                MsgBox(48, "Erreur", "Mot de passe erroné !")
            EndIf
            
        Case $boucle_menu = $Button2
            ;;;; i need a new GUI window to change parameters... ;;;
            GUISetState(@SW_DISABLE)
            _RunSecondGUI()
            GUISetState(@SW_ENABLE)
            GUISetState(@SW_RESTORE)
    EndSelect
    Sleep(20)
WEnd

Func _RunSecondGUI()
    Local $TmpGUI = GUICreate("SecureMyWeb - Administration", 300, 300) ;; Doesn't work
    GUISwitch($TmpGUI)
    Local $Button = GUICtrlCreateButton('Te&st', 115, 140, 70, 25)
    GUISetState()
    
    Do
        Sleep(20)
    Until GUIGetMsg() = -3
    
    GUIDelete()
    GUISwitch($hGUIMain)
EndFunc

...

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  
Followers 0