Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 23:26

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



2 GUIs gleichzeitig bedienen

Discussion on 2 GUIs gleichzeitig bedienen within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
2 GUIs gleichzeitig bedienen

hi,

ich hab vollgendes problem:

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Form1"46978192124)
$Button1 GUICtrlCreateButton("Button1"13687525)
$Button2 GUICtrlCreateButton("Button2"264247525)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        case 
$Button1
MsgBox
(0,"","")
        case 
$Button2
_a
()
    EndSwitch
WEnd




Func _a
()

$Form2 GUICreate("Form1"200200200200)
GUISetState(@SW_SHOW)









While 
1


    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            GUISetState
(@SW_HIDE,$Form2)
            
ExitLoop


            
EndSwitch






WEnd

    EndFunc 
wenn ich das 2. gui offen habe lässt sich das 1.gui nicht mehr ansprechen. damit meine ich das die funktion mit der msgbox wenn man auf den button drückt net kommt...
maxi39 is offline  
Old 11/27/2010, 18:25   #2
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,254
ehm... doch?!
omer36 is offline  
Old 11/27/2010, 18:27   #3
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
Quote:
Originally Posted by omer36 View Post
ehm... doch?!
wie?
maxi39 is offline  
Old 11/27/2010, 18:30   #4
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,254
klappt doch ...

die msgbox kommt so oder so..

egal wieviele gui´s du noch öffnest...


ahh, hab nur die hälfte kopiert...

warum zum teufel macht ihr immer 10000000000 zeilenbrüche o.O



so hab ichs zufällig kopiert, und so klappts ;D

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Form1"46978192124)
$Button1 GUICtrlCreateButton("Button1"13687525)
$Button2 GUICtrlCreateButton("Button2"264247525)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        case 
$Button1
MsgBox
(0,"","")
        case 
$Button2
_a
()
    EndSwitch
WEnd




Func _a
()
$Form2 GUICreate("Form1"200200200200)
GUISetState(@SW_SHOW)
EndFunc 
omer36 is offline  
Old 11/27/2010, 18:39   #5
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
aba nur weil du die While schleife weggelassen hast, ich möchte noch auf dem 2. gui funktion ausführen
maxi39 is offline  
Old 11/27/2010, 18:50   #6
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,254
Quote:
Originally Posted by maxi39 View Post
aba nur weil du die While schleife weggelassen hast, ich möchte noch auf dem 2. gui funktion ausführen
wenn du mehrere gui´s machen möchtest, machs am besten nach diesem bsp hier:


PHP Code:
$gui1 GUICreate("erstes fenster")
$button1 GUICtrlCreateButton("links"103510020)
$button2 GUICtrlCreateButton("rechts"2503510020)

$gui2 GUICreate("schritt links")
$button3 GUICtrlCreateButton("irgentwas"103510020)
$zurueck GUICtrlCreateButton("rechts"2503510020)

GUISetState(@SW_SHOW$gui1)

While 
1
    $msg 
GUIGetMsg(1)
    Switch 
$msg[1]

        Case 
$gui1
            
Switch $msg[0]
                Case -
3
                    
Exit
                Case 
$button1
                    GUISetState
(@SW_HIDE$gui1)
                    
GUISetState(@SW_SHOW$gui2)
            EndSwitch

        Case 
$gui2
            
Switch $msg[0]
                Case -
3
                    GUISetState
(@SW_SHOW$gui1)
                    
GUISetState(@SW_HIDE$gui2)
                Case 
$button3
                    MsgBox
(0"""")
                Case 
$zurueck
                    GUISetState
(@SW_SHOW$gui1)
                    
GUISetState(@SW_HIDE$gui2)
            EndSwitch

    EndSwitch
WEnd 
falls du was hier nicht verstehst, frag einfach nach
omer36 is offline  
Thanks
1 User
Old 11/27/2010, 19:04   #7
 
PenGuin :O's Avatar
 
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
OnEventModus > Message Loop.
PenGuin :O is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
aMulit bedienen
06/18/2010 - World of Warcraft - 4 Replies
wie starte ich amulti brauche da so ein benutzer hand buch für dummies:D
Metin2 Map editor bedienen?
06/14/2010 - Metin2 Private Server - 2 Replies
Hey ich bin auf einen Metin2 Map editor gestoßen im Thread http://www.elitepvpers.com/forum/metin2-pserver-gu ides-strategies/416984-metin2-map-editor.html doch wie bedient man den? Was brauche ich sonst noch? Könnte mir da wer helfen? Mfg.: eb 12345
CS:S Guis
04/04/2010 - Counter-Strike - 15 Replies
Hej Ich hab hier mal 2 meine eigenen guis ^^ ich hoffe ihr mögt sie FPSBANANA > GUIs > CS:S > Other/Misc > Scrubs High End Gui die erste ist noch gesperrt-.- FPSBANANA > GUIs > CS:S > Other/Misc > ZombieMod Lovers Gui
Wie erstellt ihr eure GUIs in C++?
01/28/2010 - C/C++ - 26 Replies
So, nach längerer Pause möchte ich wieder mit C++ anfangen.. Nachdem ich jetzt schon einige Sachen in C++ gemacht habe würde ich gerne mal etwas mit GUIs machen. Wie erstellt ihr denn eure GUIs in C++? Ich habe schon Qt Creator versucht, aber damit bin ich nicht wirklich klargekommen und die Hilfe war wirklich keine große Hilfe.. :o Vielleicht wisst ihr ja noch ein paar andere Programme.. :) mfg
GUIs
02/05/2009 - Guild Wars - 33 Replies
Hiho, ich mal wieder :D Also, ich habe jetzt die komplette Autoit hilfe durchforstet aber immer nur bruchteile rausgefunden.. ich hab mir auch die Au3 vom Drunkenmaster angeguckt, auch da konnte ich kaum was rauserkennen.. also kann mir mal jemand bitte erklären wie man einen GUI erstellt? Danke im Vorraus :D



All times are GMT +2. The time now is 23:26.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.