Click here to Skip to main content
13,803,077 members

Comments by varocarbas (Top 9 by date)

varocarbas 13-Jun-13 14:33pm View
   
No problem. Good luck.
varocarbas 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).
varocarbas 13-Jun-13 13:58pm View
   
OK, thanks.
varocarbas 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?
varocarbas 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 :)
varocarbas 13-Jun-13 13:02pm View
   
Your code works fine (I mean... for what you want). I did pass the pointer over the new picture being created and the lines were generated.
varocarbas 13-Jun-13 13:01pm View
   
Sergey, I have to accept your expert opinion. I don't know too much about the matter and haven't analysed alternatives. A priori, I would rely on draw events rather than on other thing. But as far as apparently he wants it done in this way, I thought I should defend his position.
varocarbas 13-Jun-13 13:00pm View
   
Deleted
Sergey, I have to accept your expert opinion. I don't know too much about the matter and haven't analysed alternatives. A priori, I would rely on draw events rather than on other thing. But as far as apparently he wants it done in this way, I thought I should defend his position.
varocarbas 13-Jun-13 12:46pm View
   
Well... I did test his code and it works. After providing the proper coordinates, two lines are drawn without any problem.

Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.181215.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid