Results 1 to 10 of 10

Thread: Limit to Number of Controls per Form

  1. #1

    Thread Starter
    Member Suidae's Avatar
    Join Date
    Nov 2001
    Posts
    52

    Limit to Number of Controls per Form

    In VB6 there was an imposed limit of 255 controls (not counting arrays) that could be on a form. Is there the same limit in .NET?
    I'm a misanthropic philanthropist!
    Frog, the only white meat...

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Try it and report back to us....

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    This is insane . Don't even bother to think about it .

  4. #4

    Thread Starter
    Member Suidae's Avatar
    Join Date
    Nov 2001
    Posts
    52
    I've always wondered how the post counts get so high for some people...
    I'm a misanthropic philanthropist!
    Frog, the only white meat...

  5. #5
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    I know this applies to the Compact Framework, but not sure about the full blown flavor. There is a limit to the number of controls on the form, but it's not a number, it's a memory limit - a list view may take up more memory than a text box. Can't remember what the memory limit is.

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by Suidae
    I've always wondered how the post counts get so high for some people...
    easily , like this

  7. #7
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    check out msdn.microsoft.com. I'm looking now but I havent found anything yet.

  8. #8
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    posting teeny, tiny comments really DOES increase the post count

  9. #9
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Talking

    If you've got more than 255 controls on a form, i think you need a new form.

    I experianced the 255 limit in VB6. I fixed it by using control arrays (smart huh). But in VB.NET, the control arrays don't work the same. So if you have that many controls, you might want to break up the form into smaller pieces.
    ~Peter


  10. #10

    Thread Starter
    Member Suidae's Avatar
    Join Date
    Nov 2001
    Posts
    52
    I realize 255 controls on a form is madness. Please... I was asked the question and was expected to find the answer.

    Boss throws stick, I fetch it. I've gotten into a bad habit of paying the bills on time and can't seem to kick it.

    As it turns out Mike was correct. There is no specific limit but it is related to memory, on one machine it would work and the next bomb out.


    BTW - Thanks Mike you put me in the right direction!
    I'm a misanthropic philanthropist!
    Frog, the only white meat...

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