Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
[b][red]This message was edited by Schwarzenegger at 2006-2-11 6:6:23[/red][/b][hr]
Hello dear programmers.
I'm having a problem with this program im writing. (Im trying to create a paint brush like windows has), anyway, I've managed to form a filled rectangle but it can only be drwan from the upper left corner of the "mouse-down" method and to the right or down. If im trying to draw in the other direction, nothing happens - I just get nothing. Now, I've noticed that the rectangle is limited in the X-coordinate to 0 and the same in Y. That means that if the end-point is smaller than the start-point it doesnt respond. I've also come to realize that in the FillRectangle method itself when im opening a brackets () im getting that Im suppose to write the "X-coordinate of the UPPER-LEFT rectangle to fill" - so what does that mean? that I can only draw rectanglr from the upper left corner and down?!! probably not but I just dont know how to solve this problem. (I've pasted some line from my code) so if u know the answer or have a lead please answer me..
private void pictureBox1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
if (flag == true)
Graphics G = pictureBox1.CreateGraphics();
if (e.Button == MouseButtons.Left)
Point mp1 = new Point(0,0);
mp1.X = e.X;
mp1.Y = e.Y;
f1.PointEnd = mp1;