Results 1 to 7 of 7

Thread: [VB6] AddIn IDE Codefolding

  1. #1

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    198

    Post [VB6] AddIn IDE Codefolding

    Please download a newer version here: https://www.vbforums.com/showthread....test-versions)


    This post is old and will not be updated
    ***************************************************************************************************




    This is an add-in to Add Codefolding like capabilities to VB6 IDE


    Name:  Snap_CodeFold_2.jpg
Views: 1093
Size:  62.5 KB

    Name:  Snap_CodeFold_3.jpg
Views: 1147
Size:  43.2 KB

    Name:  Snap_CodeFold_1.jpg
Views: 1071
Size:  21.7 KB





    Unfortunately VB6 doesnt support codefolding so I came with an idea to mimic its functionality
    by relocating part of the code (Functions/Sub or Regions) towards the bottom of the file and
    leaving a placeholder that can be expanded (It can be used with subclasing. The fold storage can be moved up without problems)

    I divide foldable content into two types:

    -Function/Sub:
    They can be Folded without any problem. The project can be opened by anyone without the AddIn and
    be 100% compatible.

    -Regions:
    This are the user defined area (they can be created by selecting the lines and opening the context
    menu with the right mouse). Regions can be of three types:
    -Outer regions:
    Regions that have several Functions/Sub inside. Like before this leave a 100% compatible project.
    -Outer region with declares/enums/type:
    This ones (usually at the top of the module) are automatically marked to unfold on run/compile.
    -Inner region:
    This are the regions inside functions.There is no limit on the number of sublevels that can be
    created. If folded they are automatically unfolded on run/compile and refolded after.

    IMPORTANT!!!: Inner regions need to be padded and every region inside another need another extra level
    of padding. Not respecting this rule may break your code.
    The last two groups needs the AddIn to be enabled only if they are Folded.
    An Unfolded project is still 100% compatible with any VB6 IDE not using the AddIn.


    NOTES:
    -Sub/Function/Props need scope to be explicit ("Public Sub","Private Sub","Public Func...)
    -May fail on FULL COMPILE (CTRL+F5) when Regions are folded and VB6 is configured with
    "General->Compile on demand" (This is a bug on VB6 IDE. It dont raise the addIn event)



    DOWNLOAD: prj (AddIn) CodeFold v1.0.0.zip

  2. #2
    Lively Member
    Join Date
    Dec 2016
    Posts
    86

    Re: [VB6] AddIn IDE Codefolding

    Great Job

  3. #3
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: [VB6] AddIn IDE Codefolding

    Great functionality, looks a bit scary though.

  4. #4

    Thread Starter
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    198

    Re: [VB6] AddIn IDE Codefolding

    Quote Originally Posted by yereverluvinuncleber View Post
    Great functionality, looks a bit scary though.
    Scary why? I'm using it with no problems so far. Also got a few betatesters using it for an extended period before publishing it. Just test it and tell me

  5. #5
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    439

    Re: [VB6] AddIn IDE Codefolding

    Excelent shagratt, thanks for this tool, It will be very useful to us
    leandroascierto.com Visual Basic 6 projects

  6. #6
    Addicted Member jg.sa's Avatar
    Join Date
    Nov 2017
    Location
    South Australia ( SA )
    Posts
    198

    Re: [VB6] AddIn IDE Codefolding

    Quote Originally Posted by LeandroA View Post
    Excelent shagratt, thanks for this tool, It will be very useful to us
    x 2

    What is scary about this is I have been using this feature in Excel since it became avail. eons ago !!!

    But I never though to have it in VB6 which I have been using for 20+ years.

  7. #7
    New Member
    Join Date
    Nov 2013
    Posts
    15

    Re: [VB6] AddIn IDE Codefolding

    Great AddIn Shagratt, very usefull...

    who need pay for Codesmart with this kind of free Addins...

Tags for this Thread

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