Results 1 to 6 of 6

Thread: [RESOLVED but still open for ideas] Ideas to break a huge form into smaller ones

  1. #1

    Thread Starter
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Resolved [RESOLVED but still open for ideas] Ideas to break a huge form into smaller ones

    I'm back in VB6 again!

    I have this HUGE form with hundreads of controls and code. This form is mainly an assembly of 3 loosely related parts that could have been devided into 3 or more smaller forms.

    Previous programmer tried to put everything in a single form and it became a debugging nightmare. He didn't follow any standard naming conventions and has used a control array of about 100 textboxes. Each textbox is bound to some data field (from 6 tables). And there isn't a single line of comment to describe them.

    I'm looking for an Add-in that can print current line on debug window when you hit F8. (Or any way to print control flow.)

    I think that way I'll be able to mark the codes and controls needed by each of the 3 main events. That way it will become easy to separate codes from each other.

    Any other tips or ideas ?

    Edit: Wow ! 2500 posts.
    Last edited by iPrank; May 22nd, 2008 at 01:29 PM.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Ideas to break a huge form into smaller ones

    I'm facing a similar problem. Previous programmer named his controls txtFields(0), txtFields(87), txtFields(2), txtFields(66), txtFields(11)... It's killing me. The hardest part of the job is to rename theme.

    So i would be happy to hear of some add-in that can help me a little too

  3. #3

    Thread Starter
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: Ideas to break a huge form into smaller ones

    Quote Originally Posted by gavio
    txtFields(0), txtFields(87), txtFields(2), txtFields(66), txtFields(11)...
    EXACTLY same thing happned here.
    ...and he added 'Me' keyword before EVERY control without any reason.
    Code:
    Me.txtFields(39).Text = Me.chkLedger.Value
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  4. #4
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Ideas to break a huge form into smaller ones

    Quote Originally Posted by gavio
    I'm facing a similar problem. Previous programmer named his controls txtFields(0), txtFields(87), txtFields(2), txtFields(66), txtFields(11)... It's killing me. The hardest part of the job is to rename theme.

    So i would be happy to hear of some add-in that can help me a little too
    One thing short of reworking everything might be to set up some public variable to control them. For example if txtFields(0) is last name set up

    LastName = 0 and globally change them everywhere to txtFields(LastName).

    That might be better then a rewrite.

  5. #5
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Ideas to break a huge form into smaller ones

    It's not that hard - it's just a pain in the... Specially since you haven't done anything wrong and you must be correcting such other people's stupid work habits.

  6. #6

    Thread Starter
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: Ideas to break a huge form into smaller ones

    We have decided to build 3 new forms from scratch. We figured that it will take less time and a lot less headache.
    Thanks to everyone for posting.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


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