?
Solved

Max number of controls on a delphi form

Posted on 2003-03-03
4
Medium Priority
?
251 Views
Last Modified: 2010-04-04
Hi

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

Regards
LostInSpace
0
Comment
Question by:LostInSpace2
[X]
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
4 Comments
 
LVL 3

Expert Comment

by:ILE
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;
    i:integer;

begin
    for i:=0 to 10000 do
      begin
        b:=tbutton.create(form1);

        b.parent:=form1;

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



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

:))


0
 
LVL 17

Expert Comment

by:geobul
ID: 8062937
Hi,

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
0
 
LVL 1

Expert Comment

by:TAZI
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
Regards
TAZI
0
 
LVL 17

Accepted Solution

by:
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
0

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