I’m making a seat booking system in vb.net (WinForms) and I need the user to be able to select the seat they wish to use and for it to change colour (so they can tell that it selected).
I began to try using buttons, but 480 buttons seriously slowed down the load time for the form. I then tried a data grid view with buttons in the rows/columns, but couldnt make that work properly.
My question is, how can I do this?
Would it be worth trying to use 480 picture boxes and change their background colour? Or would that just slow the form down the same way as 480 buttons?
For efficiency sake, you don’t really want to just create a ton of controls like that. It would be better to make a single custom control that draws all the seats on it’s own single drawing surface. Here’s a very simple example:
Then, in your form, put some code like this to create the locations of the seats: