Page 1 sur 1

WebGadget et Déplacement de fenêtre

Publié : jeu. 22/nov./2007 12:49
par Ar-S
Salut à tous.
Je bosse sur un All In One comportant un petit navigateur.

J'ai donc une fenêtre avec un panel.
Dans ce panel un onglet Navigateur qui affiche
- une barre d'adresse
- Un webgadget (#web)
- Des boutons GO, chercher, accueil...

Le webgadget fonctionne étrangement.
Lorsqu'une page web apparait (par exemple google)
je ne peux pas cliquer sur les liens ! je peux seulement taper dans le champ recherche. De plus, lorsque je déplace la fenêre principale, le webgadget disparait ! Je suis obligé de recliquer sur accueil ou de taper une nouvelle adresse.

Voilà le code (j'ai supprimé les procedures ne concernant pas le web et les images pour gagner de la place.)

Code : Tout sélectionner

;{- Enumerations / DataSections
;{ Windows
InitMouse()
InitKeyboard()
Enumeration
  #WIN
  #Panneau
  #Image_63
  #TXT_AFF_info_OPTIMIZ
  #VERT
  #AFF_Crypter
  #Text_A_Crypter
  #Text_DEC
  #HEX
  #DEC
  #Affiche_TXTinfo
  #MDP
  #TXT_PASS
  #BT_ZIP
  #Info_DesactiverFen
  #BT_Anim_Fen
  #Titre_amelio
  #BT_Modif_ZIC
  #REP_ZIC
  #BT_WALLPAPER
  #BT_VOIRPICS
  #AFF_IMAGE
  #ExplorerList
  #BT_Back_web
  #ADRESSE
  #BT_GO
  #AFFICHE
  #AFF_INFO
  #WEB
  #REP_IMAGES
  #REP_VIDEOS
  #REP_MESDOC
  #REP_CACHEIE
  #REP_COOKIE
  #REP_FAVORIS
  #BT_Modif_IMG
  #BT_Modif_VIDZ
  #BT_Modif_MESDOC
  #BT_Modif_Cache
  #BT_Modif_COOKIES
  #BT_Modif_Favoris
  #BT_MnuDem
  #Info_MenuDem
  #CHERCHE
  #BT_Cherche
  #BT_Accueil
  #BT_Next_WEB
  #BT_Stop_Web
  #BT_LDVMULTIMEDIA
  #BT_Source_Web
  #BIN
  #Text_HEX
  #Text_48
  #AFF_CRYPT
  #Text_CRYPTER
  #IMG_titre
  #BT_CacheSYS
  #TXT_CacheSys
  #Button_56
  #String_57
  #TextVERT
  #BT_DON
  #Font_Panneau
  #Font_BT_ZIP
  #Font_Titre_amelio
  #Font_BT_WALLPAPER
  #Font_BT_VOIRPICS
  #Font_BT_Back_web
  #Font_BT_Next_WEB
  #Font_BT_Stop_Web
  #Font_BT_Source_Web
  #Font_BT_DON
  #Image_Image_63
  #Image_Image_60
  #Image_Image_10
  #Image_Image_53
EndEnumeration
;-{les Globales ;--
Global BT_Back_web_Tooltip
Global BT_Cherche_Tooltip
Global BT_Accueil_Tooltip
Global BT_Next_WEB_Tooltip
Global BT_Stop_Web_Tooltip
Global BT_LDVMULTIMEDIA_Tooltip
Global BT_Source_Web_Tooltip
Global v$="1.0"
Global NeedReboot$=Chr(10)+"Vous devrez peut-être redémarrer Windows pour que la modification soit effective"
Global about$=Chr(10)
;}



;}
;{ Image Plugins
UseJPEGImageDecoder()
;}
; Create tooltip
Procedure GadgetBalloonToolTip(WindowNumber.l, GadgetNumber.l, Text.s)
  Protected Tooltip.l, Balloon.TOOLINFO
  Tooltip = CreateWindowEx_(0, "ToolTips_Class32", "", #WS_POPUP | #TTS_NOPREFIX | #TTS_BALLOON, 0, 0, 0, 0, WindowID(WindowNumber), 0, GetModuleHandle_(0), 0)
  SendMessage_(Tooltip, #TTM_SETTIPTEXTCOLOR, GetSysColor_(#COLOR_INFOTEXT), 0)
  SendMessage_(Tooltip, #TTM_SETTIPBKCOLOR, GetSysColor_(#COLOR_INFOBK), 0)
  SendMessage_(Tooltip, #TTM_SETMAXTIPWIDTH, 0, 180)
  Balloon\cbSize = SizeOf(TOOLINFO)
  Balloon\uFlags = #TTF_IDISHWND | #TTF_SUBCLASS
  Balloon\hwnd = GadgetID(GadgetNumber)
  Balloon\uId = GadgetID(GadgetNumber)
  Balloon\lpszText = @Text
  SendMessage_(Tooltip, #TTM_ADDTOOL, 0, @Balloon)
  ProcedureReturn Tooltip
EndProcedure
; Change tooltip text
Procedure ChangeGadgetBalloonToolTip(Tooltip.l, GadgetNumber.l, Text.s)
  Protected Balloon.TOOLINFO
  Balloon\cbSize = SizeOf(TOOLINFO)
  Balloon\uFlags = #TTF_IDISHWND | #TTF_SUBCLASS
  Balloon\hwnd = GadgetID(GadgetNumber)
  Balloon\uId = GadgetID(GadgetNumber)
  Balloon\lpszText = @Text
  SendMessage_(Tooltip, #TTM_ADDTOOL, 0, @Balloon)
EndProcedure
; Free tooltip
Procedure FreeBalloonTooltip(Tooltip.l)
  DestroyWindow_(Tooltip.l)
EndProcedure 
;
ProcedureDLL.s Url2Text2(Url.s, OpenType.b,ProxyAndPort.s)
  ;/ Author : Pille
  isLoop.b=1
  INET_RELOAD.l = $80000000
  hInet.l=0
  hURL.l=0
  Bytes.l=0
  Buffer.s= Space (2048 )
  RES.s= ""
  hInet = InternetOpen_ ( "" , OpenType, ProxyAndPort, "" , 0)
  hURL = InternetOpenUrl_ (hInet, Url, #Null , 0, INET_RELOAD, 0)
  Repeat
    InternetReadFile_ (hURL,@Buffer, Len (Buffer), @Bytes)
    If Bytes = 0
      isLoop=0
    Else
      RES = RES + Left (Buffer, Bytes)
    EndIf
  Until isLoop=0
  InternetCloseHandle_ (hURL)
  InternetCloseHandle_ (hInet)
  ProcedureReturn RES
EndProcedure

ProcedureDLL.s Url2Text(Url.s)
  ProcedureReturn Url2Text2(Url,1, "" )
EndProcedure 


Url$="http://google.com"

Define.l Event, EventWindow, EventGadget, EventType, EventMenu
;}
Procedure OpenWindow_WIN()
  If OpenWindow(#WIN, 202, 488, 764, 637, "LDVMULTIMEDIA AIO - XP PRO EDITION", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
    If CreateGadgetList(WindowID(#WIN))
      StringGadget(#AFFICHE, 0, 617, 764, 20, "LDVMULTIMEDIA AIO XP PRO EDITION - Ceci est un logiciel FREEWARE", #PB_String_BorderLess|#PB_String_ReadOnly|#ES_CENTER|#WS_BORDER)
      PanelGadget(#Panneau, 0, 50, 764, 565) ;>
        ; Information
        AddGadgetItem(#Panneau, -1, "Information")
        EditorGadget(#Affiche_TXTinfo, 459, 1, 298, 536, #PB_Editor_ReadOnly)
        EditorGadget(#AFF_INFO, 0, 0, 455, 536, #PB_Editor_ReadOnly)
        ; Optimisations
        AddGadgetItem(#Panneau, -1, "Optimisations")
        EditorGadget(#TXT_AFF_info_OPTIMIZ, 10, 405, 735, 115, #PB_Editor_ReadOnly)
        SetGadgetText(#TXT_AFF_info_OPTIMIZ, "ATTENTION : il est conseillé de sauvegarder votre base de registre avant de procéder à ces manipulations."+Chr(10)+"Pour cela, vous devez faire : Demarrer/executer puis taper regedit."+Chr(10)+"Ensuite faites Fichier / Exporter et sauvegardez votre fichier.")
        StringGadget(#Info_DesactiverFen, 290, 237, 455, 20, "Permet d'accélérer l'affichage des fenêtres de windows", #ES_CENTER|#PB_String_BorderLess|#WS_BORDER)
        ButtonGadget(#BT_Anim_Fen, 10, 235, 270, 25, "Désactiver l'animation des fenêtres", #BS_FLAT)
        TextGadget(#Titre_amelio, 5, 210, 225, 20, "Amélioration de Windows XP Pro", #PB_Text_Center)
        ButtonGadget(#BT_Modif_ZIC, 655, 25, 90, 20, "Modifier", #BS_FLAT)
        StringGadget(#REP_ZIC, 5, 25, 645, 20, "Ma Musique : ", #PB_String_BorderLess|#WS_BORDER)
        StringGadget(#REP_IMAGES, 5, 50, 645, 20, "Mes Images : ", #PB_String_BorderLess|#WS_BORDER)
        StringGadget(#REP_VIDEOS, 5, 75, 645, 20, "Mes Vidéos : ", #PB_String_BorderLess|#WS_BORDER)
        StringGadget(#REP_MESDOC, 5, 100, 645, 20, "Mes Documents : ", #PB_String_BorderLess|#WS_BORDER)
        StringGadget(#REP_CACHEIE, 5, 125, 645, 20, "Cache Internet Explorer : ", #PB_String_BorderLess|#WS_BORDER)
        StringGadget(#REP_COOKIE, 5, 150, 645, 20, "Répertoire des Cookies : ", #PB_String_BorderLess|#WS_BORDER)
        StringGadget(#REP_FAVORIS, 5, 175, 645, 20, "Favoris : ", #PB_String_BorderLess|#WS_BORDER)
        ButtonGadget(#BT_Modif_IMG, 655, 50, 90, 20, "Modifier", #BS_FLAT)
        ButtonGadget(#BT_Modif_VIDZ, 655, 75, 90, 20, "Modifier", #BS_FLAT)
        ButtonGadget(#BT_Modif_MESDOC, 655, 100, 90, 20, "Modifier", #BS_FLAT)
        ButtonGadget(#BT_Modif_Cache, 655, 125, 90, 20, "Modifier", #BS_FLAT)
        ButtonGadget(#BT_Modif_COOKIES, 655, 150, 90, 20, "Modifier", #BS_FLAT)
        ButtonGadget(#BT_Modif_Favoris, 655, 175, 90, 20, "Modifier", #BS_FLAT)
        ButtonGadget(#BT_MnuDem, 10, 261, 270, 25, "Accélerer l'affichage du menu démarrer", #BS_FLAT)
        StringGadget(#Info_MenuDem, 290, 264, 455, 20, "Permet d'accélérer l'affichage du menu démarrer de windows", #ES_CENTER|#PB_String_BorderLess|#WS_BORDER)
        ButtonGadget(#BT_CacheSYS, 10, 287, 270, 25, "Amélioration du cache système ", #BS_FLAT)
        StringGadget(#TXT_CacheSys, 290, 291, 455, 20, "Permet à Windows de fonctionner plus rapidement", #ES_CENTER|#PB_String_BorderLess|#WS_BORDER)
        ButtonGadget(#Button_56, 10, 313, 270, 25, "Quitter plus vite les applications", #BS_FLAT)
        StringGadget(#String_57, 290, 316, 455, 20, "Comme son nom l'indique, cette amélioration accélère la fermeture des applications", #ES_CENTER|#PB_String_BorderLess|#WS_BORDER)
        TextGadget(#TextVERT, 42, 369, 300, 20, "Si le bouton est vert, c'est que l'optimisation est activée.")
        ; Navigateur Web
        AddGadgetItem(#Panneau, -1, "Navigateur Web")
        ButtonGadget(#BT_Back_web, 454, 2, 30, 24, "<", #BS_FLAT)
        BT_Back_web_Tooltip = GadgetBalloonToolTip(#WIN, #BT_Back_web, "Précédent")
        StringGadget(#ADRESSE, 0, 4, 410, 20, Url$)
        ButtonGadget(#BT_GO, 411, 2, 40, 24, "GO", #BS_FLAT)
        WebGadget(#WEB, 1, 27, 758, 486, Url$)
        StringGadget(#CHERCHE, 0, 515, 410, 20, "")
        ButtonGadget(#BT_Cherche, 415, 515, 145, 22, "Cherche via Google", #BS_FLAT)
        BT_Cherche_Tooltip = GadgetBalloonToolTip(#WIN, #BT_Cherche, "Chercher")
        ButtonGadget(#BT_Accueil, 586, 2, 48, 24, "Accueil", #BS_FLAT)
        BT_Accueil_Tooltip = GadgetBalloonToolTip(#WIN, #BT_Accueil, "Accueil")
        ButtonGadget(#BT_Next_WEB, 487, 2, 30, 24, ">", #BS_FLAT)
        BT_Next_WEB_Tooltip = GadgetBalloonToolTip(#WIN, #BT_Next_WEB, "Suivant")
        ButtonGadget(#BT_Stop_Web, 520, 2, 30, 24, "X", #BS_FLAT)
        BT_Stop_Web_Tooltip = GadgetBalloonToolTip(#WIN, #BT_Stop_Web, "Arrêter")
        ButtonGadget(#BT_LDVMULTIMEDIA, 637, 2, 120, 24, "LDV MULTIMEDIA", #BS_FLAT)
        BT_LDVMULTIMEDIA_Tooltip = GadgetBalloonToolTip(#WIN, #BT_LDVMULTIMEDIA, "Aller visiter le site de LDV MULTIMEDIA")
        ButtonGadget(#BT_Source_Web, 553, 2, 30, 24, "S", #BS_FLAT)
        BT_Source_Web_Tooltip = GadgetBalloonToolTip(#WIN, #BT_Source_Web, "Voir la source de la page")
        
        AddGadgetItem(#Panneau, -1, "Visioneuse d'image")
        ButtonGadget(#BT_WALLPAPER, 322, 510, 435, 25, "Utiliser comme fond d'écran du Bureau", #BS_FLAT)
        ButtonGadget(#BT_VOIRPICS, 322, 10, 435, 25, "Voir", #BS_FLAT)
        ExplorerListGadget(#ExplorerList, 0, 5, 315, 531, "c:\", #PB_Explorer_AlwaysShowSelection|#PB_Explorer_AutoSort|#PB_Explorer_BorderLess|#PB_Explorer_GridLines|#PB_Explorer_HeaderDragDrop|#PB_Explorer_MultiSelect)
        AddGadgetItem(#Panneau, -1, "Archiveur ZIP")
        StringGadget(#MDP, 165, 515, 195, 20, "", #ES_CENTER|#PB_String_Password|#PB_String_BorderLess|#WS_BORDER)
        TextGadget(#TXT_PASS, 1, 517, 155, 20, "Mot de passe (si nécessaire) : ")
        ButtonGadget(#BT_ZIP, 0, 0, 755, 512, "Faites glisser le/les fichier(s) à ZIPPER / DEZIPPER", #BS_FLAT)
        
        AddGadgetItem(#Panneau, -1, "Convertisseur/Crypteur")
        EditorGadget(#AFF_Crypter, 5, 455, 750, 80, #PB_Editor_ReadOnly)
        TextGadget(#Text_A_Crypter, 5, 295, 89, 17, "Texte à Crypter")
        TextGadget(#Text_DEC, 5, 5, 80, 18, "Texte")
        StringGadget(#HEX, 5, 145, 750, 35, "", #ES_CENTER|#PB_String_BorderLess|#WS_BORDER)
        StringGadget(#DEC, 5, 23, 750, 80, "", #ES_CENTER|#WS_BORDER|#ES_MULTILINE|#PB_String_BorderLess)
        StringGadget(#BIN, 5, 205, 750, 35, "", #ES_CENTER|#PB_String_BorderLess|#WS_BORDER)
        TextGadget(#Text_HEX, 5, 125, 80, 18, "Hexadécimal")
        TextGadget(#Text_48, 5, 186, 48, 17, "Binaire")
        EditorGadget(#AFF_CRYPT, 5, 315, 750, 115)
        TextGadget(#Text_CRYPTER, 5, 435, 66, 17, "Résultat")
        ;     ?
        AddGadgetItem(#Panneau, -1, "    ?")
        ButtonGadget(#BT_DON, 85, 455, 600, 70, "FAIRE UN DON VIA PAYPAL MAINTENANT")
      CloseGadgetList() ;<
      ; Gadget Fonts
      SetGadgetFont(#Panneau, LoadFont(#Font_Panneau, "Arial Unicode MS", 9, 272))
      SetGadgetFont(#BT_ZIP, LoadFont(#Font_BT_ZIP, "Microsoft Sans Serif", 15, 272))
      SetGadgetFont(#Titre_amelio, LoadFont(#Font_Titre_amelio, "Microsoft Sans Serif", 9, 272))
      SetGadgetFont(#BT_WALLPAPER, LoadFont(#Font_BT_WALLPAPER, "Microsoft Sans Serif", 9, 272))
      SetGadgetFont(#BT_VOIRPICS, LoadFont(#Font_BT_VOIRPICS, "Microsoft Sans Serif", 9, 272))
      SetGadgetFont(#BT_Back_web, LoadFont(#Font_BT_Back_web, "Microsoft Sans Serif", 9, 272))
      SetGadgetFont(#BT_Next_WEB, LoadFont(#Font_BT_Next_WEB, "Microsoft Sans Serif", 9, 272))
      SetGadgetFont(#BT_Stop_Web, LoadFont(#Font_BT_Stop_Web, "Microsoft Sans Serif", 9, 272))
      SetGadgetFont(#BT_Source_Web, LoadFont(#Font_BT_Source_Web, "Microsoft Sans Serif", 9, 272))
      SetGadgetFont(#BT_DON, LoadFont(#Font_BT_DON, "Microsoft Sans Serif", 14, 272))
      ; Gadget Colors
      PureCOLOR_SetGadgetColor(#Panneau, $0, $D1D1D1)
      PureCOLOR_SetGadgetColor(#VERT, #PureCOLOR_SystemColor, $DF00)
      PureCOLOR_SetGadgetColor(#AFF_Crypter, #PureCOLOR_SystemColor, $AEF1FF)
      PureCOLOR_SetGadgetColor(#Text_A_Crypter, #PureCOLOR_SystemColor, #PureCOLOR_DontSetBackColor)
      PureCOLOR_SetGadgetColor(#Text_DEC, #PureCOLOR_SystemColor, #PureCOLOR_DontSetBackColor)
      PureCOLOR_SetGadgetColor(#TXT_PASS, #PureCOLOR_SystemColor, #PureCOLOR_DontSetBackColor)
      PureCOLOR_SetButtonColor(#BT_ZIP, #PureCOLOR_SystemColor, $99EFFB)
      PureCOLOR_SetButtonColor(#BT_Anim_Fen, #PureCOLOR_SystemColor, $40C2FB)
      PureCOLOR_SetGadgetColor(#Titre_amelio, #PureCOLOR_SystemColor, #PureCOLOR_DontSetBackColor)
      PureCOLOR_SetButtonColor(#BT_Modif_ZIC, #PureCOLOR_SystemColor, $6DBEC)
      PureCOLOR_SetButtonColor(#BT_WALLPAPER, #PureCOLOR_SystemColor, $5CCEF)
      PureCOLOR_SetButtonColor(#BT_VOIRPICS, #PureCOLOR_SystemColor, $ACFEB)
      PureCOLOR_SetGadgetColor(#AFF_IMAGE, $0, $808080)
      PureCOLOR_SetButtonColor(#BT_Back_web, #PureCOLOR_SystemColor, $89E9FA)
      PureCOLOR_SetGadgetColor(#ADRESSE, #PureCOLOR_SystemColor, $FFFFFF)
      PureCOLOR_SetButtonColor(#BT_GO, #PureCOLOR_SystemColor, $11D8E8)
      PureCOLOR_SetGadgetColor(#AFFICHE, $FF00, $0)
      PureCOLOR_SetGadgetColor(#AFF_INFO, #PureCOLOR_SystemColor, $B1F7FC)
      PureCOLOR_SetGadgetColor(#WEB, #PureCOLOR_SystemColor, $EBEBEB)
      PureCOLOR_SetButtonColor(#BT_Modif_IMG, #PureCOLOR_SystemColor, $6DBEC)
      PureCOLOR_SetButtonColor(#BT_Modif_VIDZ, #PureCOLOR_SystemColor, $6DBEC)
      PureCOLOR_SetButtonColor(#BT_Modif_MESDOC, #PureCOLOR_SystemColor, $6DBEC)
      PureCOLOR_SetButtonColor(#BT_Modif_Cache, #PureCOLOR_SystemColor, $6DBEC)
      PureCOLOR_SetButtonColor(#BT_Modif_COOKIES, #PureCOLOR_SystemColor, $6DBEC)
      PureCOLOR_SetButtonColor(#BT_Modif_Favoris, #PureCOLOR_SystemColor, $6DBEC)
      PureCOLOR_SetButtonColor(#BT_MnuDem, #PureCOLOR_SystemColor, $40C2FB)
      PureCOLOR_SetGadgetColor(#CHERCHE, #PureCOLOR_SystemColor, $FFFFFF)
      PureCOLOR_SetButtonColor(#BT_Cherche, #PureCOLOR_SystemColor, $11D8E8)
      PureCOLOR_SetButtonColor(#BT_Accueil, #PureCOLOR_SystemColor, $89E9FA)
      PureCOLOR_SetButtonColor(#BT_Next_WEB, #PureCOLOR_SystemColor, $89E9FA)
      PureCOLOR_SetButtonColor(#BT_Stop_Web, #PureCOLOR_SystemColor, $89E9FA)
      PureCOLOR_SetButtonColor(#BT_LDVMULTIMEDIA, #PureCOLOR_SystemColor, $89E9FA)
      PureCOLOR_SetButtonColor(#BT_Source_Web, #PureCOLOR_SystemColor, $89E9FA)
      PureCOLOR_SetGadgetColor(#Text_HEX, #PureCOLOR_SystemColor, #PureCOLOR_DontSetBackColor)
      PureCOLOR_SetGadgetColor(#Text_48, #PureCOLOR_SystemColor, #PureCOLOR_DontSetBackColor)
      PureCOLOR_SetGadgetColor(#AFF_CRYPT, #PureCOLOR_SystemColor, $AEF1FF)
      PureCOLOR_SetGadgetColor(#Text_CRYPTER, #PureCOLOR_SystemColor, #PureCOLOR_DontSetBackColor)
      PureCOLOR_SetButtonColor(#BT_CacheSYS, #PureCOLOR_SystemColor, $40C2FB)
      PureCOLOR_SetButtonColor(#Button_56, #PureCOLOR_SystemColor, $40C2FB)
      PureCOLOR_SetGadgetColor(#TextVERT, #PureCOLOR_SystemColor, #PureCOLOR_DontSetBackColor)
      PureCOLOR_SetButtonColor(#BT_DON, #PureCOLOR_SystemColor, $CCDE9)
      ; Window Backcolor
      PureCOLOR_SetWindowColor(#WIN, $FC1E1)
    EndIf
  EndIf
EndProcedure

OpenWindow_WIN()

;{- Event loop
Repeat
  MesDocuments$=RegGetValue(CleFolders$,ValueMesDoc$,".")
  MesImages$=RegGetValue(CleFolders$,ValueMesImages$,".")
  MesVideos$=RegGetValue(CleFolders$,ValueMesVideo$,".")
  Cookies$=RegGetValue(CleFolders$,ValueCookies$,".")
  Favoris$=RegGetValue(CleFolders$,ValueFavoris$,".")
  CacheIE$=RegGetValue(CleFolders$,ValueCacheIE$,".")
  MaZik$=RegGetValue(CleFolders$,ValueMaZik$,".")
  Event = WaitWindowEvent()
  Select Event
    ; ///////////////////
    Case #PB_Event_Gadget
      EventGadget = EventGadget()
      EventType = EventType()
      If EventGadget = #Panneau
      ElseIf EventGadget = #Image_63
      ElseIf EventGadget = #TXT_AFF_info_OPTIMIZ
      ElseIf EventGadget = #VERT
      ElseIf EventGadget = #AFF_Crypter
      ElseIf EventGadget = #Text_A_Crypter
      ElseIf EventGadget = #Text_DEC
      ElseIf EventGadget = #HEX
      ElseIf EventGadget = #DEC
      ElseIf EventGadget = #Affiche_TXTinfo
      ElseIf EventGadget = #MDP
      ElseIf EventGadget = #TXT_PASS
      ElseIf EventGadget = #BT_ZIP
      ElseIf EventGadget = #Info_DesactiverFen
      ElseIf EventGadget = #BT_Anim_Fen
      ElseIf EventGadget = #Titre_amelio
      ElseIf EventGadget = #BT_Modif_ZIC
      ElseIf EventGadget = #REP_ZIC
      ElseIf EventGadget = #BT_WALLPAPER
      ElseIf EventGadget = #BT_VOIRPICS
      ElseIf EventGadget = #AFF_IMAGE
      ElseIf EventGadget = #ExplorerList 
      ElseIf EventGadget = #AFFICHE
      ElseIf EventGadget = #AFF_INFO
        
        SetGadgetText(#AFF_INFO,InfoSYSTEM$)
      ElseIf EventGadget = #REP_IMAGES
      ElseIf EventGadget = #REP_VIDEOS
      ElseIf EventGadget = #REP_MESDOC
      ElseIf EventGadget = #REP_CACHEIE
      ElseIf EventGadget = #REP_COOKIE
      ElseIf EventGadget = #REP_FAVORIS
      ElseIf EventGadget = #BT_Modif_IMG
      ElseIf EventGadget = #BT_Modif_VIDZ
      ElseIf EventGadget = #BT_Modif_MESDOC
      ElseIf EventGadget = #BT_Modif_Cache
      ElseIf EventGadget = #BT_Modif_COOKIES
      ElseIf EventGadget = #BT_Modif_Favoris
      ElseIf EventGadget = #BT_MnuDem
      ElseIf EventGadget = #Info_MenuDem
      ElseIf EventGadget = #WEB
        Url$=GetGadgetText(#WEB)
      ElseIf EventGadget = #CHERCHE
      ElseIf EventGadget = #BT_Cherche
      ElseIf EventGadget = #BT_Accueil
        Url$="http://google.fr"
        WebGadget(#WEB, 1, 102, 758, 486, Url$)
        SetGadgetText(#ADRESSE,Url$)
      ElseIf EventGadget = #BT_Next_WEB
      ElseIf EventGadget = #BT_Stop_Web
      ElseIf EventGadget = #BT_LDVMULTIMEDIA
      ElseIf EventGadget = #BT_Back_web
      ElseIf EventGadget = #ADRESSE
        Url$=GetGadgetText(#ADRESSE)
      ElseIf EventGadget = #BT_GO
        Url$=GetGadgetText(#ADRESSE)
        Delay(50)
        WebGadget(#WEB, 1, 102, 758, 486, Url$) 
      ElseIf EventGadget = #BT_Source_Web
        Url$=GetGadgetText(#ADRESSE)
        If Url$="http://" Or Url$=""
          MessageRequester("Erreur","pas d'adresse dans la barre d'adresse")
        Else
          Source$=Url2Text(Url$)
          MessageRequester ("Source",Source$)
        EndIf
      ElseIf EventGadget = #BIN
      ElseIf EventGadget = #Text_HEX
      ElseIf EventGadget = #Text_48
      ElseIf EventGadget = #AFF_CRYPT
      ElseIf EventGadget = #Text_CRYPTER
      ElseIf EventGadget = #IMG_titre
      ElseIf EventGadget = #BT_CacheSYS
      ElseIf EventGadget = #TXT_CacheSys
      ElseIf EventGadget = #Button_56
      ElseIf EventGadget = #String_57
      ElseIf EventGadget = #TextVERT
      ElseIf EventGadget = #BT_DON
      EndIf
      ; ////////////////////////
    Case #PB_Event_CloseWindow
      EventWindow = EventWindow()
      If EventWindow = #WIN
        CloseWindow(#WIN)
        Break
      EndIf
  EndSelect
ForEver
;
;}

Publié : jeu. 22/nov./2007 22:26
par Chris
Dans le code du bouton "Accueil", il faut mettre SetGadgetText() sur le webgadget.

Code : Tout sélectionner

      ElseIf EventGadget = #BT_Accueil 
        Url$="http://google.fr" 
        SetGadgetText(#WEB, Url$)
        ;WebGadget(#WEB, 1, 102, 758, 486, Url$) 
        SetGadgetText(#ADRESSE,Url$) 
Edit : Et dans le code du bouton "GO" aussi, d'ailleurs :lol:

Edit 2 : Pis faudrait peut-être voir à étudier l'aide en profondeur, hein! :roll:

Publié : mar. 27/nov./2007 11:37
par Ar-S
Merci Chris,
après quelques jours au vert, je me remets à min soft;
Merci pour ta réponse.

J'essaye toujours de lire la doc avant de poster mais parfois, je passe à coté de trucs énormes.