Author Topic: Freehand Drawing on the main form  (Read 3624 times)

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Freehand Drawing on the main form
« on: January 21, 2015, 03:43:09 PM »
If anyone might find it useful here is a link for video that shows the code:

https://www.youtube.com/watch?v=U0Z1IEOFGe4  (change pen color to some other than black since AHMI screen is usually black)

And if you ad the same "If" loop but for the Right mouse button and change the code to:

Me.CreateGraphics.DrawLine(New Pen(Me.BackColor, 60), last.X, last.Y, e.X, e.Y)

then you can erase the lines when holding the right mouse button down.

This freehand drawing didn't  go over or affect the controls on my form and could be used for presentation purposes or similar.
Don't get surprised if a certain control does get affected by this drawing.
« Last Edit: January 21, 2015, 04:08:44 PM by Godra »