J'ai choisi comme exemple d'intégrer une animation exemple au format flash.
Code : Tout sélectionner
IncludePath "Include"
XIncludeFile "COMatePLUS.pbi"
Enumeration
#MainForm
#Container
EndEnumeration
Define.COMateObject FlashObject
If OpenWindow(#Mainform, #PB_Ignore, #PB_Ignore, 400, 280, "COMate Flash-Demo")
ContainerGadget(#Container, 0, 0, 400, 280)
CloseGadgetList()
FlashObject = COMate_CreateObject("ShockwaveFlash.ShockwaveFlash", GadgetID(#Container))
FileSWF.s=GetCurrentDirectory()+"media\test.swf"
If FlashObject
FlashObject\Invoke("LoadMovie(#False, '"+FileSWF+"')")
Repeat
result = FlashObject\GetIntegerProperty("ReadyState")
Until Result = 4
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
FlashObject\Release()
Else
MessageRequester("Information","Oops il manque peut etre le plugin Flash")
EndIf
EndIf
L'archive complète de COMatePlus et de ses nombreux exemple d'OLE Automation se trouve sur ce lien