avec une image gadget dedans !
lorsqu'on clique sur l'image un requester s'affiche , cliquez sur le requester
puis sans cliquer remettez la souris sur l'imagegadget
le requester reviens !!! comme si l'on avait cliqué!!

Code : Tout sélectionner
; PureBasic Visual Designer v3.95 build 1485 (PB4Code)
; PureBasic Visual Designer v3.95 build 1485 (PB4Code)
;- Window Constants
;
Enumeration
#Window_0
EndEnumeration
;- Gadget Constants
;
Enumeration
#image_0
EndEnumeration
;- Image Plugins
;- Image Globals
Global Image0
;- Catch Images
Image0 = CatchImage(0, ?Image0)
;- Images
DataSection
Image0:
IncludeBinary "C:\WINDOWS\Bulles de savon.bmp"
EndDataSection
Procedure Open_Window_0()
If OpenWindow(#Window_0, 10, 230, 342, 263, "New window ( 0 )", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
If CreateGadgetList(WindowID(#Window_0))
ImageGadget(#image_0, 40, 30, 90, 100, Image0)
EndIf
EndIf
EndProcedure
Open_Window_0()
Repeat ; Start of the event loop
Event = WaitWindowEvent() ; This line waits until an event is received from Windows
WindowID = EventWindow() ; The Window where the event is generated, can be used in the gadget procedures
GadgetID = EventGadget() ; Is it a gadget event?
EventType = EventType() ; The event type
;You can place code here, and use the result as parameters for the procedures
If Event = #PB_Event_Gadget
If GadgetID = #image_0
MessageRequester("test","test",#PB_MessageRequester_Ok)
EndIf
EndIf
Until Event = #PB_Event_CloseWindow ; End of the event loop
End
;
ou ne filtrer que l'evenement interressant .....