I try to use stack class for paint bucket function ,but when running and clicking on selected area in picture box to be filled with selected color, nothing happens and cpu usage goes up to %100 and system hangs! here is the code,first, picture box code for selecting this function and call fill function after clicking:
So ,any suggestion for correcting or a better code for paint bucket?