Tag Archives: MouseMove

Handle generic TreeNode mouse events in C#

This example shows how you can make a generic TreeNode class handle MouseMove and MouseDown events. It adds those events to the example described in the following posts: Make a generic TreeNode class in C#, Part 1 Make a generic … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , | 10 Comments

Draw, move, and delete line segments in C#

This example shows how to make a drawing program that lets you draw, move, and delete line segments. It’s based on the example Draw and move line segments in C#. See that example for information about how the program lets … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , , , , , , | 31 Comments

Draw and move polygons snapping them to a grid in C#

This example lets the user draw and move polygons snapping them to a grid. See the example Let the user draw polygons, move them, and add points to them in C# for information on how the program lets the user … Continue reading

Posted in algorithms, drawing, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , , , , | 6 Comments

Let the user draw polygons, move them, and add points to them in C#

This example lets the user draw polygons, move them, and add points to them. It’s an extension of the example Let the user draw and move polygons in C#. See that example for a description of most of this program’s … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , , | 13 Comments

Let the user draw and move polygons in C#

This example lets the user draw and move polygons. It builds on the example Let the user draw polygons in C#. The program uses MouseDown, MouseMove, and MouseUp event handlers to let the user draw and interact with the polygons. … Continue reading

Posted in algorithms, drawing, graphics | Tagged , , , , , , , , , , , , , , , | 18 Comments

Let the user draw polygons in C#

This example shows how you can let the user draw polygons with the mouse. It represents each polygon as a list of points. It stores all of the finished polygons in a list of lists of points named Polygons, which … Continue reading

Posted in algorithms, drawing, graphics | Tagged , , , , , , , , , , , , , | 23 Comments

Let the user draw and move line segments snapping their positions to a snap grid in C#

See the example Draw and move line segments in C# for basic information about the program. This example does the same thing, but lets you snap segments and end points to a grid. When the drawing PictureBox is resized or … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , | 7 Comments

Draw and move line segments in C#

This example lets the user draw and move line segments. It lets you perform three different operations depending on what is below the mouse. When the mouse is over a segment, the cursor changes to a hand. Then you can … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , , | 77 Comments