Home | Course Index | C2 Project |
Let me know what you think |
Course 2DCis: 2D-Computer Graphics with C#
|
using namespaces |
Entry to start our .NET Windows program: public class Form1 : Form |
Constructor public Form1() inside public class Form1 inside public class Form1 |
g = this.CreateGraphics(); //The current Device Context is loaded once and will be maintained for the rest of the life time of Form1. This is the simplest method to get a Device Context once and forever, but this method will ignore any change of the window size during run time. Professional code must reload the Device Context much more often e.g. at any OnMouseMove and OnPaint events in order to keep in pace with possible changes of Form1 during run time.
Overridden event handler OnMouseDown(MouseEventArgs e) inside public class Form1 |
Overridden event handler OnMouseMove(MouseEventArgs e) inside public class Form1 |
Overridden event handler OnMouseUp(MouseEventArgs e) inside public class Form1 |
Overridden event handler OnPaint(PaintEventArgs e) inside public class Form1 |
top of page: |