By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,556 Members | 1,572 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,556 IT Pros & Developers. It's quick & easy.

Maximum number of controls on .Net Windows Form?

P: n/a
What is maximum number of controls allowed on .Net
Windows Form?

I know it's 254 in VB6.
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Why, are you coming close to the limit or just curios ?? :-
)

But you aren't the first person to think of this question
apparently. Some responses I found were one guy who added
512 buttons without any problems and another guy thought
the only limit now is on system resources.

Well, I just added 1080 buttons to my form (curiosity got
to me) and it took about 65 seconds to load in debug
mode. Granted I don't have a P4 3Ghz system here but I
wouldn't suggest it in an application :-)

I am of the oppinion that system resources will become the
issue before any limit (if one exists) will.

-Roy

-----Original Message-----
What is maximum number of controls allowed on .Net
Windows Form?

I know it's 254 in VB6.
.

Nov 20 '05 #2

P: n/a
Hello,

"Hal Gibson" <ha*******@earthlink.net> schrieb:
What is maximum number of controls allowed on .Net
Windows Form?

I know it's 254 in VB6.


AFAIK there is no hard limitation. Nevertheless, I would not load more than
256 controls onto a form because the form will require a lot of memory.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3

P: n/a
Cor
Hi Hal,
We had a test with dynamicly removing controls some weeks ago.

Therefore Nak has made a test program, that with a randomizer puts about
5000 buttons and 5000 labels on a form.

I do'nt know which persons have used it to do the test, but I did not see
here any complains about that program.

I added something to make the amount of controls endless and I have stopped
that at 25000 (in debugger mode).

It took to much time to make this as normal behaviour.

Cor
ps. Maybe Nak has the program still downloadable.


Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.