error creating windows handle in usercontrol

T

terrasamba

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.
 
B

Brian

Just use only ONE check box and move it from place to place when a user
selects a cell. Example: cell 1,1 is active (where the check box is located)
then when the user selects another cell like 30, 30 move the check box to
that cell. You can hold all the grid information in an array of some kind.
 
C

Cor

Hi terrasamba,
We did some test in this newsgroup with controls, you can make an impossible
amount of them,
but with what you are telling it is not usable anymore for a user as far as
I remember me the tests.
I think it becomes to slow building them. But you can search for it in this
newsgroup.
Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top