Max number of controls on a delphi form

Posted on 2003-03-03
Medium Priority
Last Modified: 2010-04-04

Visual Basic has a max of 256 controls per form.
Am wondering what if any are the limits for Delphi.

Question by:LostInSpace2
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 8061378
i think there is no practical limit

here is a example who create dinamicly 10.000 buttons on the form and

procedure TForm1.BitBtn1Click(Sender: TObject);
var b:tbutton;

    for i:=0 to 10000 do


         if i mod 100= 0 then form1.Caption:=inttostr(i);

litle slow to execute (after first 2000-3000 buttons
but wery goood example for our collegs VB-EXPERTS


LVL 17

Expert Comment

ID: 8062937

There is an OS limit for GDI resourses which is different among Windows versions. For example, Win2000/XP can handle more resources than Win9x. Each TWinControl descendant occupies such a resource.

Regards, Geo

Expert Comment

ID: 8062958
Hi ..

There is some sort of minor problem ....

I've written a huge system and I toggele between notebook pages. All on 1 Form - I've now intergrated Dialler Technology into the program and experience unending problems.  At some stage, all breakpoints were ignored and the application refused to break for debugging purposes.  Further to this, The program just acted up ... I hand major problems and eventually reverted to an old backup copy.  I then moved certain controls off the form to a new form (All popup date calendars and Message Dialog Boxes)

I have note made use of standard dialog boxes.  I've coded my own popups to fit in with the look and feel of the system.

I then re-coded the dialler technology most of the development on a new form.  Certain aspects and controls needed to be on the main form.  But I haven't had a problem eversince.

So there is some sort of minor problem ... I can't quite tell you exactly how many controls.

I will try counting the number of controls on the form and post it onto this site

Hope this information is useful
LVL 17

Accepted Solution

geobul earned 150 total points
ID: 8062996
ComponentCount and ControlCount properties of TForm are of integer type. So, there is a limit of 2147483647 components that can be placed on a form ;-)

Regards, Geo

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question