How to connect events in VBScript


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:





























IP camera URL:
username:
password:



CLASSID="CLSID:B7A1B3FE-59CB-4C8E-81CC-FFC6EC6834DE">







Wyszukiwarka

Podobne podstrony:
SpeedWealth How to make A Million In Your Own Business in 3 Years or less
How to connect your PC to a TV
(Gardening) Wildflower Meadows How To Create One In Your Garden 1
How to not respond in class
How to Live Safely in a Science
How to Debate Leftists and Win In Their Own Game Travis L Hughes
Sex Secrets How To Turn A Woman On, Satisfy Her In A Big Way
Tutorial How To Make an UML Class Diagram In Visio
The Principles of Successful Manifesting How to Live your Life Dreams in Abundance and Prosperity
How to complain in English
How To Make Money Shorting Stocks In Up And Down Markets
2002 07 Ssh How to Remotely Connect to a System with Ssh
E Book Art Anime How To Draw Iria

więcej podobnych podstron