General Category > Tips & Tricks

Freehand Drawing on the main form

(1/1)

Godra:
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.

Navigation

[0] Message Index

Go to full version