VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Class Event Wrapper

AJ Hill  (1 Submission)   Object Oriented Programming (OOP)   Beginner   Wed 3rd February 2021

This is an example of how to use a "wrapper"
class to allow you to get access to the public
events of instanced objects from a module within
your program (instead of having to embed the
code within a form, which is bad practice).

Assumes
A few weeks ago I submitted a class to handle buffering of outputs to increase efficiency of write-to-file operations of a program I was working on. The class worked just fine, but I noticed that you couldn't get access to the events of the class from a module (which then prevents you from taking advantage of the object's inbuilt limit detection. This was a real nuisance, so I wrapped up the code in a DLL which could then be linked to and all worked fine... except for a point raised by TerriTop - marshalling data to and from the DLL. This project is my take on a work-around for using the objects within the same project and still experiencing the benefit of using their events (from a module).

API Declarations
n/a

Rate Class Event Wrapper (6(6 Vote))

Download Class Event Wrapper

Class Event Wrapper Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters