Merci c'est ce qu'il me fallait.
Code : Tout sélectionner
; PureBasic Visual Designer v3.92 build 1460
;- Window Constants
;
Enumeration
#Window_0
EndEnumeration
;- Gadget Constants
;
Enumeration
#Button_0
#Button_1
#Combo_0
#Image_0
#Button_2
#Button_3
#Button_4
#Button_5
EndEnumeration
Message$="RaDiO WeB v1.1 par MFdev. "
;- Image Plugins
UseJPEGImageDecoder()
;- Image Globals
Global Image0
;- Catch Images
Image0 = CatchImage(0, ?Image0)
;- Images
DataSection
Image0:
IncludeBinary "C:\Documents and Settings\le psychopathe\Bureau\MFstudios.jpg"
EndDataSection
Procedure Open_Window_0()
If OpenWindow(#Window_0, 216, 0, 300, 110, #PB_Window_TitleBar | #PB_Window_MinimizeGadget , "RaDiO WeB v1.1 par MFstudios")
If CreateGadgetList(WindowID())
ButtonGadget(#Button_0, 0, 70, 50, 20, "play")
ButtonGadget(#Button_1, 50, 70, 50, 20, "stop")
ComboBoxGadget(#Combo_0, 180, 70, 120, 230)
ImageGadget(#Image_0, 0, 0, 300, 70, Image0)
ButtonGadget(#Button_2, 100, 70, 80, 20, "MFdev")
ButtonGadget(#Button_3, 10, 90, 50, 20, "Exit")
ButtonGadget(#Button_4, 60, 90, 50, 20, "info")
ButtonGadget(#Button_5, 110, 90, 70, 20, "A propos")
EndIf
EndIf
EndProcedure
open_window_0()
AddGadgetItem(#Combo_0, -1, "contact")
AddGadgetItem(#Combo_0, -1, "Europe 2")
AddGadgetItem(#Combo_0, -1, "lemouv'")
AddGadgetItem(#Combo_0, -1, "NRJ")
AddGadgetItem(#Combo_0, -1, "OUÏ FM")
AddGadgetItem(#Combo_0, -1, "Radio junior")
SetGadgetState(#Combo_0,0)
Repeat
Select WindowEvent()
Case #PB_Event_CloseWindow
End
Case #PB_Event_Gadget
Select EventGadgetID()
Case 0
Goto active
Case 1
FreeGadget(8)
Case 2
position = GetGadgetState(#Combo_0)
Case 4
RunProgram("http://mfdeveloppement.info")
Case 5
End
Case 6
MessageRequester("info", "V1.1 beta. Je travail sur une nouvelle version avec plus de radio.",#PB_MessageRequester_Ok )
Case 7
Resultat = MessageRequester("A propos", Message$,#PB_MessageRequester_Ok )
EndSelect
EndSelect
Returne:
Delay(10)
Until lol=5
active:
Result$ = GetGadgetItemText(#Combo_0,position,0)
If Result$="contact"
Result$="http://www.contactmusic.fr/Players/WmpPlayer.php5"
EndIf
If Result$="Europe 2"
Result$="http://www.europe2.fr/yacast/player.php#"
EndIf
If Result$="lemouv'"
Result$="http://cache.yacast.fr/V4/lemouv/mouv_live_V3.html#"
EndIf
If Result$="NRJ"
Result$="http://player.nrj.fr/V4/nrj/nrj_launch_V3.html"
EndIf
If Result$="OUÏ FM"
Result$="http://www.ouirock.com/player/#"
EndIf
If Result$="Radio junior"
Result$="http://www.radiojunior.com/"
EndIf
WebGadget(8, 180, 50, 1, 1, Result$)
Goto Returne
Si vous avez des commentaires... Je suis à votre écoute et en quête de savoir.