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!

error creating windows handle in usercontrol

Status
Not open for further replies.

TerraSamba

Programmer
Aug 19, 2002
57
NL
Hi guys, done it again, got myself stuck ... this time on the following issue:

I have made a user control that more or less simulates a grid.

You can set the amount of columns,rows, cell size, colors etc. This works fine.

This user controls simulates a grid by placing checkboxes on the usercontrol. The checkbox contains all the existing events and properties that I need.

But when I size it to the maximum dimentions that I need (100 rows by 100 columns) this will create 10.000 controls,
besides that it is slow .... even with suspendlayout .... after about 5000 it looks like I reached the maximum. No more handles can be obtained ... and generates an error.

Is there a solution for this?
What is the maximum amount of controls you can put on a usercontrol or any control?
Anybody got bright ideas to obtain simular functionality?
(a grid where one or more cells can be selected and that can receive drag-drop events and host images)

Thanx for any help,






The gap between theory and practice is not as wide in theory as it is in practice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top