Difference between revisions of "DesktopOLEContainer"

From Xojo Documentation

(Created page with "N/A")
 
 
Line 1: Line 1:
N/A
+
{{ClassBox
 +
| super=[[DesktopUIControl]]
 +
| platform=win
 +
| scope=global
 +
}}
 +
{{Description
 +
|text=The generic container for embedding ActiveX controls (Windows only).
 +
}}
 +
 
 +
<dynamicTable id="Events" super="DesktopUIControl" class="eventTable" title="Events" columns="3">
 +
{{Event | name=EnableWindowlessMode | returntype=[[Boolean]] | newinversion=2021r3=EnableWindowlessMode() as Boolean&#x0A;This event is triggered by windowless ActiveX controls }}
 +
{{Event | name=EventTriggered | params=NameOfEvent as [[String]], Parameters() as [[Variant]]  | returntype=[[Variant]] | description=EventTriggered(NameOfEvent as String, Parameters() as Variant ) as Variant&#x0A;Occurs when the ActiveX control receives an event from the user.  }}
 +
{{Event | name=ShowObject | description=ShowObject()&#x0A;Occurs when the ActiveX object is ready to be displayed. }}
 +
</dynamicTable>
 +
 
 +
<dynamicTable id="Properties" super="DesktopUIControl" class="propertyTable" title="Properties" columns="3">
 +
{{Property | name=Content | type=OLEObject | platform=all | description=( OLEObject)&nbsp;&nbsp;The OLEObject associated with the ActiveX control }}
 +
{{Property | name=DesignMode | type=Boolean | platform=all | description=( Boolean)&nbsp;&nbsp;Indicates whether the container is in Design Mode. }}
 +
{{Property | name=ProgramID | type=String | platform=all | description=( String)&nbsp;&nbsp;The ActiveX control's program ID as stored in the registry }}
 +
</dynamicTable>
 +
 
 +
<dynamicTable id="Methods" super="DesktopUIControl" class="methodTable" title="Methods" columns="3">
 +
{{Method | name=Create | params=[Show as [[Boolean]]] | returntype=[[Boolean]] | description=Create([Show as Boolean]) as Boolean&#x0A;Creates an ActiveX control. Create uses the ProgramID property to create the ActiveX control. }}
 +
{{Method | name=Destroy | description=Destroy()&#x0A;Destroys the currently embedded ActiveX control, so you can reuse your OLEContainer. }}
 +
{{Method | name=Show | newinversion=2007r4 | description=Show()&#x0A;Used in conjunction with Create, you can call Show to activate the ActiveX control after its properties have been assigned }}
 +
{{Method | name=ShowPropertyPages | description=ShowPropertyPages()&#x0A;Displays the ActiveX control's Property pages, if any. }}
 +
{{Method | name=Subscribe | params= eventsIID As [[String]] | returntype=[[UInt32]] | description=Subscribe(eventsIID As String) As UInt32&#x0A;Subscribes to the specified events interface (in IID string format) to receive events and returns a token that can be used to unsubscribe.}}
 +
{{Method | name=Unsubscribe | params= token As [[UInt32]] | description=Subscribe(token As UInt32)&#x0A;Unsubscribes from specified events interface (in IID string format) via the token passed.}}
 +
</dynamicTable>
 +
 
 +
== Sample Code ==
 +
This code illustrates the usage of the Create and Show methods. The ShockWave ActiveX control has been assigned to the OLEContainer in the IDE.
 +
<rbcode>
 +
OLEContainer1.ProgramID = "ShockwaveFlash.ShockwaveFlash"
 +
 
 +
If OLEContainer1.Create(False) Then
 +
  OLEContainer1.Content.Wmode = "Transparent"
 +
  OLEContainer1.Show
 +
End If
 +
</rbcode>
 +
 
 +
==See Also==
 +
[[OLEObject]] class.
 +
 
 +
[[Category:Windows_OLE]]
 +
[[Category:Desktop]]
 +
[[Category:Desktop Controls]]

Latest revision as of 19:17, 23 July 2021

Class (inherits from DesktopUIControl)


The generic container for embedding ActiveX controls (Windows only).

Events
Closing EventTriggered MouseExit
ConstructContextualMenu FocusLost MouseMove
ContextualMenuItemSelected FocusReceived MouseUp
DragEnter KeyDown MouseWheel
DragExit KeyUp Opening
DragOver MouseDown ShowObject
DropObject MouseDrag
EnableWindowlessMode MouseEnter
Properties
Active fa-lock-32.png Left ProgramID
AllowAutoDeactivate LockBottom Scope fa-lock-32.png
AllowTabStop LockLeft TabIndex
Content LockRight Tooltip
DesignMode LockTop Top
Enabled MouseCursor Transparent
Handle fa-lock-32.png Name fa-lock-32.png Visible
Height PanelIndex Width
Index fa-lock-32.png Parent Window fa-lock-32.png
Methods
AcceptFileDrop Create Show
AcceptPictureDrop Destroy ShowPropertyPages
AcceptRawDataDrop DrawInto Subscribe
AcceptTextDrop Refresh Unsubscribe
Close SetFocus

Sample Code

This code illustrates the usage of the Create and Show methods. The ShockWave ActiveX control has been assigned to the OLEContainer in the IDE.

OLEContainer1.ProgramID = "ShockwaveFlash.ShockwaveFlash"

If OLEContainer1.Create(False) Then
OLEContainer1.Content.Wmode = "Transparent"
OLEContainer1.Show
End If

See Also

OLEObject class.