visualAd
Aug 29th, 2002, 03:53 PM
I have created an active x control which contains four classes. I have basically created a control which accesses the registry, the classes being: key, keys, value and values. I am looking to use this control with the windows script host and would like to raise an event in one of the classes and allow the client code to respond to this.
I have tried the following.
1) Creating istances of the class using the WithEvents statement. However the user control complains that it cannot be done inside a procedure.
Public Function getKey(ByVal strKeyName As String) As Key
Dim WithEvents returnKey As Key
Set returnKey = New Key
......
2) I have also tried declaring a global variable WithEvents and assigning a new object variable to that global variable.
Does anyone know a way of making an event raised in a class visible to a WSH Script??
I have tried the following.
1) Creating istances of the class using the WithEvents statement. However the user control complains that it cannot be done inside a procedure.
Public Function getKey(ByVal strKeyName As String) As Key
Dim WithEvents returnKey As Key
Set returnKey = New Key
......
2) I have also tried declaring a global variable WithEvents and assigning a new object variable to that global variable.
Does anyone know a way of making an event raised in a class visible to a WSH Script??