Image Global/Constanten Check
Verfasst: 06.02.2020 12:30
Hallo Leute,
stehe gerad auf der Leitung. Warum geht Image mit Constante und NICHT mit Global?
BILD auf CONSTANTEN Checken
BILD auf GLOBAL Checken
Gruss ... Velindos!
stehe gerad auf der Leitung. Warum geht Image mit Constante und NICHT mit Global?
BILD auf CONSTANTEN Checken
Code: Alles auswählen
EnableExplicit
UsePNGImageDecoder()
Enumeration
#Img_Lander
EndEnumeration
#WndX = 400
#WndY = 266
Global Img_Lander
Img_Lander = CatchImage(#Img_Lander,?Img_Lander)
ResizeImage(#Img_Lander,#WndX, #WndY,#PB_Image_Smooth)
DataSection
Img_Lander:
IncludeBinary "D:\[Pure@API]\[STORE]\png\MarsLander.png" ; <================= BILD
EndDataSection
Global Flags = #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget
OpenWindow(0, 100, 200, #WndX, #WndY, "Imgae Constanten Check", Flags )
ImageGadget(1,0,0,#WndX,#WndY,ImageID(#Img_Lander))
Define Event, Quit
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_CloseWindow ; If the user has pressed on the close button
Quit = 1
EndIf
Until Quit = 1
Code: Alles auswählen
EnableExplicit
UsePNGImageDecoder()
#WndX = 400
#WndY = 266
Global Img_Lander
Img_Lander = CatchImage(#PB_Any,?Img_Lander)
DataSection
Img_Lander:
IncludeBinary "D:\[Pure@API]\[STORE]\png\MarsLander.png"
EndDataSection
ResizeImage(Img_Lander, #WndX, #WndY,#PB_Image_Smooth)
Global Flags = #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget
OpenWindow(0, 100, 200, #WndX, #WndY, "Image Global Check", Flags )
ImageGadget(1,0,0,#WndX, #WndY,Img_Lander)
Define Event, Quit
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_CloseWindow ; If the user has pressed on the close button
Quit = 1
EndIf
Until Quit = 1