path: root/extensions/test/ole/EventListenerSample
diff options
authorJoachim Lingner <>2001-11-28 08:30:16 +0000
committerJoachim Lingner <>2001-11-28 08:30:16 +0000
commit9cd85f2543d56d4efbdac6382f248ae2ac482130 (patch)
tree59b39c2255d85cf4b87298e79c2fbb245f274b43 /extensions/test/ole/EventListenerSample
parent7f0798b36d6541891b629341abf2b436b348d5d7 (diff)
*** empty log message ***
Diffstat (limited to 'extensions/test/ole/EventListenerSample')
2 files changed, 30 insertions, 4 deletions
diff --git a/extensions/test/ole/EventListenerSample/events.htm b/extensions/test/ole/EventListenerSample/events.htm
index be6d9aa2dfd0..a9ac88bd11ec 100644
--- a/extensions/test/ole/EventListenerSample/events.htm
+++ b/extensions/test/ole/EventListenerSample/events.htm
@@ -42,7 +42,7 @@ function XEventListener_disposing( source)
<script language="VBScript">
-SUB MainVB()
+SUB MainVB( id)
Set objServiceManager= CreateObject("")
Set objCoreReflection= objServiceManager.createInstance("")
@@ -53,7 +53,13 @@ Set objDesktop= objServiceManager.createInstance("")
Dim args()
Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, args)
-Set eventListener= CreateObject("EventListener.EvtListener")
+Dim eventListener
+select case id
+ case 0
+ Set eventListener= CreateObject("EventListener.EvtListener")
+ case 1
+ Set eventListener= CreateObject("VBasicEventListener.VBEventListener")
+end select
objDocument.addEventListener eventlistener
@@ -79,7 +85,13 @@ is written in C++ and housed in a dll. Then the event listener is added to the d
The button runs VBScript code that creates the components EventListener.EvtListener and adds it
to the document.
-<button onclick='MainVB()'>VBScript</Button>
+<button onclick='MainVB(0)'>VBScript</Button>
+Runs VBScript code that creates VBasicEventListener.VBEventListener ActiveX component which was
+written with VB
+<button onclick='MainVB(1)'>VBScript</Button>
diff --git a/extensions/test/ole/EventListenerSample/readme.txt b/extensions/test/ole/EventListenerSample/readme.txt
index 0e7cb4197c2c..46c674153ab7 100644
--- a/extensions/test/ole/EventListenerSample/readme.txt
+++ b/extensions/test/ole/EventListenerSample/readme.txt
@@ -1,4 +1,18 @@
The folder EventListener contains an MSDEV project that builds a dll that contains
the EventListener.EvtListener ActiveX component. The component implements the XEventListener
interface according to the rules of the OleBridge. The component will be used from the
-HTML page events.htm. \ No newline at end of file
+HTML page events.htm.
+Contains a Visual Basic project that builds an ActiveX component that implements Its ProgId is VBasicEventListener.VBEventListener
+The dll should also be checked in. VB needs its TLB, so it uses the same CLSIDs on
+the next build. The component will create a message box when its disposing function
+has been called.
+The project also contains a client that builds a Project1.exe (in the same folder)
+that creates VBEventListener and adds it to a StarOffice document