lu
c'est vrai que c'est le foutoire , ton code marche bien mais tu pourait faire la meme chose pour les deux bouton dans les 2 panel pour quil marche tout les deux stp , car yen à que un qui marche
tien le code , tu peut le modifier ??stp
Code : Tout sélectionner
;
; ABCDEFGHIJKLMOPQRSTUVWXYZ
;
;
;
;
Enumeration
#Window_0
#Window_1
#Window_2
EndEnumeration
Enumeration
#Web_1
#Web_0
#Panel_1
#Button_1
#Button_3
EndEnumeration
Global FontID1
FontID1 = LoadFont(1, "Arial", 8, #PB_Font_Bold)
Global FontID2
FontID2 = LoadFont(2, "Arial", 8)
Global FontID3
FontID3 = LoadFont(3, "Arial", 8, #PB_Font_Bold | #PB_Font_Italic)
Procedure Open_Window_0()
If OpenWindow(#Window_0, 194, 310, 305, 329, "NoelOo tool v1.01", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
If CreateGadgetList(WindowID(#Window_0))
;- prog
PanelGadget(#Panel_1, 0, 0, 320, 330)
AddGadgetItem(#Panel_1, -1, "rien")
AddGadgetItem(#Panel_1, -1, "1ere fenetre")
ButtonGadget(#Button_1, 78, 278, 120, 20, "Telecharger le .bat")
AddGadgetItem(#Panel_1, -1, "2eme fenetre")
ButtonGadget(#Button_3, 58, 118, 170, 20, "2eme fenetre")
CloseGadgetList()
EndIf
EndIf
EndProcedure
Open_Window_0()
Repeat ; Start of the event loop
Event = WaitWindowEvent() ; This line waits until an event is received from Windows
WindowID = EventWindow() ; The Window where the event is generated, can be used in the gadget procedures
GadgetID = EventGadget() ; Is it a gadget event?
EventType = EventType() ; The event type
;You can place code here, and use the result as parameters for the procedures
If Event = #PB_Event_Gadget
If GadgetID = #Button_1
Gosub fenetre_3
EndIf
EndIf
Until Event = #PB_Event_CloseWindow ; End of the event loop
End
;
; 2em fenetre
fenetre_3:
OpenWindow(#Window_2, 294, 245, 600, 300, "super site", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
If CreateGadgetList(WindowID(#Window_2))
WebGadget(#Web_1, 5, 5, 590, 290, "http://purebasic.fr/french/viewforum.php?f=1")
Repeat
Event2 = WaitWindowEvent() ; This line waits until an event is received from Windows
WindowID2 = EventWindow() ; The Window where the event is generated, can be used in the gadget procedures
GadgetID2 = EventGadget() ; Is it a gadget event?
EventType2 = EventType() ; The event type
Until Event2=#PB_Event_CloseWindow
CloseWindow(#Window_2)
Return
Open_Window_0()
EndIf
Repeat ; Start of the event loop
Event = WaitWindowEvent() ; This line waits until an event is received from Windows
WindowID = EventWindow() ; The Window where the event is generated, can be used in the gadget procedures
GadgetID = EventGadget() ; Is it a gadget event?
EventType = EventType() ; The event type
;You can place code here, and use the result as parameters for the procedures
If Event = #PB_Event_Gadget
If GadgetID = #Button_3
Gosub fenetre_2
EndIf
EndIf
Until Event = #PB_Event_CloseWindow ; End of the event loop
End
;
; 2em fenetre
fenetre_2:
OpenWindow(#Window_1, 294, 245, 600, 300, "2eme fenetre", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
If CreateGadgetList(WindowID(#Window_1))
WebGadget(#Web_0, 5, 5, 590, 290, "www.jeuxvideo.com")
Repeat
Event2 = WaitWindowEvent() ; This line waits until an event is received from Windows
WindowID2 = EventWindow() ; The Window where the event is generated, can be used in the gadget procedures
GadgetID2 = EventGadget() ; Is it a gadget event?
EventType2 = EventType() ; The event type
Until Event =#PB_Event_CloseWindow
CloseWindow(#Window_1)
Return
EndIf
re re re re merci d'avance
