Ever wondered writing an HTTP Handler for WinForms
"Today, I am writing an Application Event Handler Component (AEHC) for any WinForm Application in .NET. AEHC is an event handler for your winforms application, The primary functionality of this component is to raise an event after every forms load into memory. So that we can handle its event for performing any custom code processing and return the control to the form after processing.
Let's consider a scenario, While implementing security into our application, we may have to disable or enable certain controls on every form according the role of the user accessing the form. For this we will call a custom method [for an instance AuthorizeMe()] to perform custom authentication and authorization from each and every form in our application. Suppose if in any case we forget to call its method from one of our form, in result there will be no security applied to that form.
Now, with AEHC we only call the method AuthorizeMe() once per application from AEHC and then its AEHC's responsibility to execute AuthorizeMe() every time, after the form is loaded.
..."
Interesting. Seems like the Application events in VB2K5 but extended... I like the concept and can see a number of ways these (form loaded/unloaded events) and related events could be useful.
Will be watching as this matures.
Update #1 11/15/2004 @ 5:24 PM PST:
Looks like he's done....
He's also done a nice write up on CodeProject, http://www.codeproject.com/vb/net/aeh.asp
No comments:
Post a Comment
NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...
ALL comments are moderated. I will review every comment before it will appear on the blog.
Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...
I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...
Please see my comment policy for more information if you are interested.
Thanks,
Greg
PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...