Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading Many Custom Controls Crashes the Application

Status
Not open for further replies.

fcoomermd

Programmer
Nov 20, 2002
218
CA
I have a very intense screen which consists of many instances of a custom control. The control consists of many labels (approx. 52 labels). I have a list of employees, and for each employee I load this custom control in a panel. When the Company consists of only 10 - 20 employees, everything runs smoothly. However, should the company consist of 40 + employees, the redrawing of the controls is very slow, and should the company exceed 40+, the application will often crash!
I have already taken the liberty to use control arrays... This has helped a little, but still does not solve my problem...

Please, can someone advise... Thank you
 
Yes... The data is a combination of labels and one checkbox. Also, some of the labels utilize the click event. Therefore swithching to a datagrid maybe very difficult... I just need a way to load the controls and not consume so much memory (I think)...
 
Me thinks, you think wrong.

I don't think any user wants to see more then a couple hundred labels. And you are suggesting thousands (40 x 50). I think the user wants to see the data he needs.

But I could be wrong.

Christiaan Baes
Belgium

"My new site" - Me
 
It presents more like a datagrid... Very seamless... Trust me though. I don't want to argue the design. I just want to know how to handle the number of controls.
 
forgive me for butting in like this, but let me get this straight.

you've mimicked a datagrid row using 53 label controls.

now you're complaining because when you get to forty rows (and 2k labels) your machine runs out of resources.

the obvious response is to buy more resources. more memory would help a lot.

although, of course, every time your company employed say, five more people you'll probably need more still.

i suggest you post your question here, they're friendly people. besides, whoever comes after you to maintain this control will post it there anyway.


mr s. <;)

 
If you insist on keeping your custom control, then you need to optimize it. Is there any way of combining several of the labels, or do they all contain "dynamic" data?

Do you have something running in the background that is taking up extra memory?

Is there anyway you can link to a screen cap or give a more detailed explanation of what you're trying to accomplish?

SWM Programmer Seeking 3d Modeling work. Either for long term commitment or just friendship. Likes long hours in front of a flat screen with heavy doses of Mountain Dew.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top