Aidez moi sa me ****.
gadgetImage et hide window PROBLEME
- Le psychopathe
- Messages : 764
- Inscription : jeu. 03/mars/2005 19:23
gadgetImage et hide window PROBLEME
Voilà j'ai fais un programme avec une image mais quand je dis hide window et que je fais réaffiche la fenêtre l'image a disparu. J'ai aussi détruit le gadget et refais avec image mais rien j'arrive pas à remettre une image.
Aidez moi sa me ****.
Aidez moi sa me ****.
Dernière modification par Le psychopathe le sam. 10/sept./2005 8:04, modifié 1 fois.
- Le psychopathe
- Messages : 764
- Inscription : jeu. 03/mars/2005 19:23
- Le psychopathe
- Messages : 764
- Inscription : jeu. 03/mars/2005 19:23
Deux options possibles, l'une par un callback qui réaffiche l'image, ce qui n'est pas une sinécure, la seconde insérer l'image dans un ImageGadget() comme le précise LeCyb ...
Code : Tout sélectionner
Enumeration
#Window_Main
#Image
#Gadget_Image
EndEnumeration
WindowWidth = 640
WindowHeight = 480
ImageWidth = WindowWidth
ImageHeight = WindowHeight
If OpenWindow(#Window_Main, 0, 0, WindowWidth, WindowHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered, "MyWindow")
AddKeyboardShortcut(#Window_Main, #PB_Shortcut_Escape, #PB_Shortcut_Escape)
ImageID = CreateImage(#Image, ImageWidth, ImageHeight)
StartDrawing(ImageOutput())
Box(0, 0, WindowWidth, WindowHeight, #Blue)
DrawingMode(1)
Locate(10, 10)
DrawText("This is an image")
StopDrawing()
If CreateGadgetList(WindowID(#Window_Main))
ImageGadget(#Gadget_Image, 0, 0, WindowWidth, WindowHeight, ImageID)
EndIf
Quit = #False
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Quit = #True
Case #PB_Event_Menu
Select EventMenuID()
Case #PB_Shortcut_Escape
Quit = #True
EndSelect
EndSelect
Until Quit
EndIf
End
Mon avatar reproduit l'image de 4x1.8m présentée au 'Salon international du meuble de Paris' en janvier 2004, dans l'exposition 'Shades' réunisant 22 créateurs autour de Matt Sindall. L'original est un stratifié en 150 dpi.
- Le psychopathe
- Messages : 764
- Inscription : jeu. 03/mars/2005 19:23
- Le psychopathe
- Messages : 764
- Inscription : jeu. 03/mars/2005 19:23