Actuating DHTML Events From VB

DHTML offers a wide array of events. Accessing them from VB can get Hairy. There are two methods to acessing these events the first and by far the easiest is:

dim withevent as msxml.domdocument

This allows for events to be coded in the standard way however accessing most events is not this easy. It takes the creation of a custom class that contains a default property. The repost below describes how to access the httprequest events from vb. The method described can be used to access any DHTML event. Attached is a sample DHTML Application from VB6 Enterprise SP4 that responds to a button onclick event. The Repost though has one short coming. It shows how to invoke a class in responses to a event but fails to return the event to the calling object. This can be accomplished using VB's RaiseEvent Method which is the method used in the zipped sample.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.