Problème de mise à jour
Problème de mise à jour
Bonjour,
Je réactualise certain de mes anciens prog et j'ai un souci.
---- morceau de procédure
Repeat
Event= WaitWindowEvent()
If Event= WindowEvent()
Select EventGadget() ; boutons, zone de texte, ...
Case #g_bouton_quitter_aide
Event= #PB_EventCloseWindow ; on stocke dans event l'évènement quitter, ainsi l'appui sur le bouton quitter rvient à l'appui sur la croix
EndSelect
EndIf
Until Event = #PB_EventCloseWindow
; on ferme la fenêtre internet
CloseWindow(#o_faide)
EndProcedure
-------------------------------------------
Après compilation j'ai :
#PB_EventCloseWindow --> constante introuvable
ou est l'erreur ?
Je réactualise certain de mes anciens prog et j'ai un souci.
---- morceau de procédure
Repeat
Event= WaitWindowEvent()
If Event= WindowEvent()
Select EventGadget() ; boutons, zone de texte, ...
Case #g_bouton_quitter_aide
Event= #PB_EventCloseWindow ; on stocke dans event l'évènement quitter, ainsi l'appui sur le bouton quitter rvient à l'appui sur la croix
EndSelect
EndIf
Until Event = #PB_EventCloseWindow
; on ferme la fenêtre internet
CloseWindow(#o_faide)
EndProcedure
-------------------------------------------
Après compilation j'ai :
#PB_EventCloseWindow --> constante introuvable
ou est l'erreur ?
-
- Messages : 471
- Inscription : dim. 23/déc./2007 18:10
suite ...
j'ai une procédure
----------
Procedure FenetreApropos()
If OpenWindow(#o_fapropos, 0, 0, 300, 350, "A propos",#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
ImageGadget(#o_logo_mpap, 25, 10, 250, 82, LOGMPap,#PB_Image_Border)
ButtonGadget (#g_bouton_quitter_apropos, 120, 300,60, 30,"Fermer")
If CreateImage(#id_apropos,300,300)
StartDrawing(WindowOutput(#id_apropos))
BackColor(RGB(0,155,155)) ; Change the text back and front colour
FrontColor(RGB(0,0,0))
DrawingMode(1)
DrawText(35,120,"xxxx")
DrawText(25,150,"xxxx")
DrawText(25,185,"xxxx")
DrawText(100,210,"xxxxxx")
DrawText(55,230,"xxxxxx")
StopDrawing()
EndIf
Repeat
Event= WaitWindowEvent()
If Event= #PB_Event_Gadget
Select EventGadget() ; boutons, zone de texte, ...
Case #g_bouton_quitter_apropos
Event= #PB_Event_CloseWindow; on stocke dans event l'évènement quitter, ainsi l'appui sur le bouton quitter rvient à l'appui sur la croix
EndSelect
EndIf
Until Event = #PB_Event_CloseWindow
CloseWindow(#o_fapropos)
EndIf
EndProcedure
--------------------------------------
Mon problème est que le contenu ne s'affiche pas et ...
je ne voie pas ou est l'erreur
j'ai une procédure
----------
Procedure FenetreApropos()
If OpenWindow(#o_fapropos, 0, 0, 300, 350, "A propos",#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
ImageGadget(#o_logo_mpap, 25, 10, 250, 82, LOGMPap,#PB_Image_Border)
ButtonGadget (#g_bouton_quitter_apropos, 120, 300,60, 30,"Fermer")
If CreateImage(#id_apropos,300,300)
StartDrawing(WindowOutput(#id_apropos))
BackColor(RGB(0,155,155)) ; Change the text back and front colour
FrontColor(RGB(0,0,0))
DrawingMode(1)
DrawText(35,120,"xxxx")
DrawText(25,150,"xxxx")
DrawText(25,185,"xxxx")
DrawText(100,210,"xxxxxx")
DrawText(55,230,"xxxxxx")
StopDrawing()
EndIf
Repeat
Event= WaitWindowEvent()
If Event= #PB_Event_Gadget
Select EventGadget() ; boutons, zone de texte, ...
Case #g_bouton_quitter_apropos
Event= #PB_Event_CloseWindow; on stocke dans event l'évènement quitter, ainsi l'appui sur le bouton quitter rvient à l'appui sur la croix
EndSelect
EndIf
Until Event = #PB_Event_CloseWindow
CloseWindow(#o_fapropos)
EndIf
EndProcedure
--------------------------------------
Mon problème est que le contenu ne s'affiche pas et ...
je ne voie pas ou est l'erreur
pense au balise
tu créer une image de 300x300 , si la création a réussie , tu dessine dans la fenetre... tu fait quoi de l'image ? tu la crée , et après ? pense à mettre des codes complet pour t'aider.
on ne peut même pas testé la fct°
@+
Code : Tout sélectionner
[ /code]
[code]If CreateImage(#id_apropos,300,300)
StartDrawing(WindowOutput(#id_apropos))
BackColor(RGB(0,155,155)) ; Change the text back and front colour
FrontColor(RGB(0,0,0))
DrawingMode(1)
DrawText(35,120,"xxxx")
DrawText(25,150,"xxxx")
DrawText(25,185,"xxxx")
DrawText(100,210,"xxxxxx")
DrawText(55,230,"xxxxxx")
StopDrawing()
EndIf
on ne peut même pas testé la fct°
@+
Code : Tout sélectionner
Enumeration
#o_fapropos
#g_bouton_quitter_apropos
#id_apropos
#o_logo_mpap
EndEnumeration
Procedure FenetreApropos()
If OpenWindow(#o_fapropos, 0, 0, 300, 350, "A propos",#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
If CreateImage(#id_apropos,300,300)
StartDrawing(ImageOutput(#id_apropos))
Box(0,0,300,300,$CACACA) ; si le fond est noir et que tu écrit en noir...
BackColor(RGB(0,155,155)) ; Change the text back and front colour
FrontColor(RGB(0,0,0))
DrawingMode(1)
DrawText(35,120,"xxxx")
DrawText(25,150,"xxxx")
DrawText(25,185,"xxxx")
DrawText(100,210,"xxxxxx")
DrawText(55,230,"xxxxxx")
StopDrawing()
EndIf
ImageGadget(#o_logo_mpap, 0, 0, 300, 300, ImageID(#id_apropos),#PB_Image_Border)
ButtonGadget (#g_bouton_quitter_apropos, 120, 320,60, 30,"Fermer")
Repeat
Event= WaitWindowEvent()
If Event= #PB_Event_Gadget
Select EventGadget() ; boutons, zone de texte, ...
Case #g_bouton_quitter_apropos
Event= #PB_Event_CloseWindow; on stocke dans event l'évènement quitter, ainsi l'appui sur le bouton quitter rvient à l'appui sur la croix
EndSelect
EndIf
Until Event = #PB_Event_CloseWindow
CloseWindow(#o_fapropos)
EndIf
EndProcedure
FenetreApropos()