How many control per form??


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: How many control per form??

  1. #1
    Bill Gates Guest

    How many control per form??


    Hello Experts

    VB 6 has a limit of 256 controls per form. I`m wondering what the limit
    is for VB NET.
    Thanks

  2. #2
    Kathleen Dollard Guest

    Re: How many control per form??

    Bill,

    Limited by the memory of the client machine except maybe on Win98.

    Kathleen



  3. #3
    Michael Culley Guest

    Re: How many control per form??

    > VB 6 has a limit of 256 controls per form. I`m wondering what the limit
    > is for VB NET.
    > Thanks


    You can create more controls on a vb6 form if you use a control array.

    --
    Michael Culley
    www.vbdotcom.com


    "Bill Gates" <bill@thebar.com> wrote in message
    news:3cd31a86$1@10.1.10.29...
    >
    > Hello Experts
    >
    > VB 6 has a limit of 256 controls per form. I`m wondering what the limit
    > is for VB NET.
    > Thanks




  4. #4
    Michael Culley Guest

    Re: How many control per form??

    > Limited by the memory of the client machine except maybe on Win98.

    Does ME not have this problem?

    --
    Michael Culley
    www.vbdotcom.com


    "Kathleen Dollard" <kathleen@mvps.org> wrote in message
    news:3cd32b04$1@10.1.10.29...
    > Bill,
    >
    > Limited by the memory of the client machine except maybe on Win98.
    >
    > Kathleen
    >
    >




  5. #5
    Bill McCarthy Guest

    Re: How many control per form??

    Hi guys,

    Actually I think you will find the limit to the number of controls is max 64K
    handles per process as per the win32 SDK. As there are other handles, the limit
    is probably closer to 10K windows per process. (by which time your winforms will
    have well and truly slowed to snail crawl pace as they redraw each **** window
    <g>)

    In 98 and ME there is a further limitation of 16K windows for the system (not just
    the current process)

    For the record, in XP, winForms here crashes and burns around 10K windows/controls
    (be careful when doing this as some controls have multiple windows (eg a combobox)
    And this limitation seems to be per process, not per form, as I tested it using
    multiple forms to, and as soon as the total reached near 10K across all the forms
    then it crashed.

    So, it will vary from circumstance to circumstance. The main thing to remember is
    performance will suffer dramatically as the number of handles increases, and that
    all WinForm controls all have at least one handle if not more, this includes the
    label control !




    "Michael Culley" <m_culley@hotmail.com> wrote in message
    news:3cd48464@10.1.10.29...
    > > Limited by the memory of the client machine except maybe on Win98.

    >
    > Does ME not have this problem?
    >
    > --
    > Michael Culley
    > www.vbdotcom.com
    >
    >
    > "Kathleen Dollard" <kathleen@mvps.org> wrote in message
    > news:3cd32b04$1@10.1.10.29...
    > > Bill,
    > >
    > > Limited by the memory of the client machine except maybe on Win98.
    > >
    > > Kathleen
    > >
    > >

    >
    >




  6. #6
    Rob Teixeira Guest

    Re: How many control per form??



    If you have to ask, there's probably too many

    -Rob


    "Bill Gates" <bill@thebar.com> wrote:
    >
    >Hello Experts
    >
    >VB 6 has a limit of 256 controls per form. I`m wondering what the limit
    >is for VB NET.
    >Thanks



  7. #7
    Kathleen Dollard Guest

    Re: How many control per form??

    Bill,

    > Actually I think you will find the limit to the number of controls is max

    64K
    > handles per process as per the win32 SDK. As there are other handles, the

    limit
    > is probably closer to 10K windows per process. (by which time your

    winforms will
    > have well and truly slowed to snail crawl pace as they redraw each ****

    window
    > <g>)


    Thanks for correcting my incorrect post. I can't remember who told me that.

    > For the record, in XP, winForms here crashes and burns around 10K

    windows/controls
    > (be careful when doing this as some controls have multiple windows (eg a

    combobox)
    > And this limitation seems to be per process, not per form, as I tested it

    using
    > multiple forms to, and as soon as the total reached near 10K across all

    the forms
    > then it crashed.


    You are running 512M memory? So if someone found a similar 10,000 handle
    limit on say a 256M box then it implies that the limit is the handles. I am
    surprised that there are 54K other handles, although I expected there would
    be a lot. It being handle rather than memory limited makes sense.

    > So, it will vary from circumstance to circumstance. The main thing to

    remember is
    > performance will suffer dramatically as the number of handles increases,

    and that
    > all WinForm controls all have at least one handle if not more, this

    includes the
    > label control !


    And converted forms (and some user techniques) use a label to draw a line.

    The performance is related to the number of created handles, so the number
    of controls in the project is unimportant, only those that are dispayed at
    one time in the process.

    Kathleen




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center