Results 1 to 1 of 1

Thread: Streamlined SelfSub, SelfHook, SelfCallback & SelfTimer [Pre-release 1]

  1. #1

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Streamlined SelfSub, SelfHook, SelfCallback & SelfTimer [Pre-release 1]

    This is a work-in-progress with a simple goal: streamlining and cleaning up SelfSub & co. so that the procedures are a bit longer, but there are far fewer of them. If you take a look into the original project, you see that there are 27 procedures which aren't in any particular clear order and they don't have a solid naming convention. In this streamlined version you can see 18 and finding out the ones to remove should be ease. In the original there is also tons of comments, and while comments are good to have they can make copy'n'paste quite hard. Thus I've come up with a rewrite of this great piece of code and I'm only posting this as an alternative, not as a replacement, for those who may find this easier to work with than the original.

    At the moment my work is not complete: I still have some SelfSub code to rewrite and I have done zero testing due to time limitations (weekends are too short). If you can do some testing for the working parts of the code it'll be appreciated at this point.

    Code:
    '*************************************************************************************************
    '* Streamlined SelfSub, SelfHook, SelfCallback & SelfTimer
    '* -------------------------------------------------------
    '* By Merri, http://www.vbforums.com/member.php?u=39255
    '*
    '* Based on http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=68737&lngWId=1
    '* by Paul Caton, contributions by Tai Chi Minh Ralph Eastwood and LaVolpe
    '*
    '* The purpose of this snippet is to streamline the code: less procedures to look at, optional
    '* procedures are clearly stated and everything is sorted in alphabetical order as much as
    '* possible. Error handling has been changed to be entirely silent, however there is a Procedure
    '* constant in most procedures so that you can somewhat trivially add an error handler if you
    '* wish to have one. On Error Goto has been almost entirely removed. All common procedures start
    '* with Self_ and are required unless explicitly marked as optional.
    '*
    '* VERSION HISTORY
    '* ---------------
    '* Pre-release 1 (2009-06-14)
    '* - Missing: SelfSub_MsgAdd, SelfSub_MsgRemove, SelfSub_Remove, SelfSub_RemoveAll
    '* - No testing done by author
    '*
    '*************************************************************************************************
    Just like the original, this code can be used with forms, classes, user controls & property pages.



    Edit
    I've finished the missing portions of code and am now testing & debugging.
    Attached Files Attached Files
    Last edited by Merri; Jun 16th, 2009 at 10:32 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width