To connect an event in VB script, proceed as follows:
(let's take as sample the OnAuthenticationNeeded event)
- look at the event to get the parameter names of the events (there are several ways to retrieve them, e.g. search for "AuthenticationNeeded" in the "vidgrab_vc6.tlh" file included under \VC6\Interfaces)
- if your HTML embedded OCX is named "VideoGrabber" and the event you want to create is "OnAuthenticationNeeded", create a Sub named by the contatenation of the object and event names separated a "_", e.g.:
Sub VideoGrabber_OnAuthenticationNeeded
and just specify the parameters names, e.g.:
Sub VideoGrabber_OnAuthenticationNeeded (AuthenticationType, Realm, Server, Username, Password) ... End Sub
By this way the event will be wrapped automatically to the OCX by its name.
Sample code of this implementation in a HTML page: