Results 1 to 11 of 11

Thread: Control Limit in VB??

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    37

    Post

    I'm having a serious problem. I made a form that has two picture boxes. In one picture box there are going to be multiple frames which have a lot of textboxes and labels.

    The other picture box will have buttons that will display the frames. Now after drawing two frames and putting all the controls in, it says I have hit the control limit for the form. How can I get rid of that?? This project is due on Jan 15th!!

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    If you ever hit the control limit on a form, you should take that as a hint to rethink your UI design

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    You can get around your problem by creating control arrays rather than individual controls. No matter how many members there are in the control array, it only counts as 1 against the limit (which is 254).

    ------------------
    Marty

  4. #4

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    37

    Post

    actually I did use Control arrays now and have bypassed that limit until I had three tax forms in there.

    My first version had MDIforms and Child Forms, but I wanted a way to have a toolbar on the side with buttons so if hte person pressed a button on it, it would show the taxform on the right. Similar to this site where I have a frame on the left which has the contents and a frame on the right which shows the main info.

    If there is a way to do this with multiple forms please let me know.

  5. #5
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Add a Picturebox with Buttons or a Toolbar to the MDI Parent Form, with Alignment set to Left Align, then on Each Button Click Event Show the Corresponding Child Form Maximized.

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]


  6. #6

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    37

    Post

    that's a good idea..

    How do I make a toolbar in VB?

    [This message has been edited by madd indian (edited 01-05-2000).]

  7. #7
    Addicted Member
    Join Date
    Jul 1999
    Posts
    219

    Post

    why dont you just hafve 2 forms that look like one and have buttons and that on one form and the other stuff on the other form like a web page look do that

  8. #8

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    37

    Post

    that would take to long.

  9. #9

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    37

    Post

    well it's a good design...each frame contains a tax form, and all the frames are hidden until the user clicks a button which will display the tax form.

    It's not messy or anything, i don't have controls all over the place.

    Anyway does anyone know how to get rid of hte control limit?

    PS: My project is to make a tax program

  10. #10
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    I'm not sure there is a way around the Control Limit for a Form, besides having that many controls on a Form has got to affect performance.

    We have produced Taxform software here and we did it by using an MDIForm with MDIChild Forms for Each Taxform, that way you shouldn't get anywhere near the Control Limit for each Child Form.

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]


  11. #11

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    37

    Post

    nenvermind, I used Aaron Young's method and now it works..

    thanks a lot for all the replies.

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