Im doing a Naval Battle for University. I decided to do it in C#. My board is 20 x 20 of mini (20×20) PictureBoxes. The problem is when I load the board I got a huuuge delay for draw all of them in the panel which contains them. So I thought to ThreadPool my method to escale the picuteres boxes creation and drawing fester.
Is this the correct aproach? I’m wondering if even if I launch 20 threads to create and set the picturesoboxes together I will still have the graphic delay.
(I wont past code right now because maybe the answer independs of it… if not, I past next 🙂
Sorry the bad english,
Thanks folks!
Basically this would not be very ok because you should not change the UI from other threads beside the main one. Doing that would result in improper behaviour. You could check the code where you load the pictures, probably it can be improved or just think of a different implementation.