Click here to Skip to main content
15,741,981 members

Comments by Alvaro Carballo Garcia (Top 9 by date)

Alvaro Carballo Garcia 13-Jun-13 14:33pm View    
No problem. Good luck.
Alvaro Carballo Garcia 13-Jun-13 14:06pm View    
Actually, when I firstly saw your code I said to me "what on the hell will he be doing with this array of pictureboxes without handlers". The problem, bahman01 is that the taken approach is not right. Sergey's advice makes every second more sense: take it easy and start step by step. Firstly understand exactly the best way to accomplish the most difficult part here (line drawing) and then do some research to keep clarifying all your doubts (like creating objects with handlers at runtime).
Alvaro Carballo Garcia 13-Jun-13 13:58pm View    
OK, thanks.
Alvaro Carballo Garcia 13-Jun-13 13:51pm View    
What you mean with how to control the handlers? All the code inside the pic_MouseMove (I would use MouseEnter, MouseHover and MouseLeave but yours works too... you can create as many handlers as you wish by doing the same that you did for pic_MouseMove) function is triggered when the mouse moves over the given pictureBox. You can use them just as triggers of what you want when you want; don't need to use the arguments (at least, for what you are doing): "PictureBox thisPB = (PictureBox)sender" is a waste of code you can access the pictureBox directly, either via pics or via pic.
I think that you have too many not-so-clear ideas; why not following the advice of Sergey, doing everything step by step and understanding each single bit?
Alvaro Carballo Garcia 13-Jun-13 13:10pm View    
OK, OK. As said, I am a poor ignorant (on this specific matter) and just wanted to help a bit to correct a simple problem, without looking at the big picture. Perhaps I should have let this question for more experienced developers on this who might see beyond the small errors and give a solid and really-helpful feedback. I will intend to not make the same error again. I am new in all this thing of participating in online programmers' networks :)