Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Snippet/paint.
#1
I'm making a type of "Snippet" program that takes a screenshot of your, well screen obviously. Right now I have a capture, clear, and save button.
After the screenshot is captured I want to be able to Freehand draw on it but I can't seem to figure out how.
So far I have a small idea but I don't know what to do with it.
Underneath the public class-

Dim q As System.Drawing.Graphics

And in the picture box

Private Sub PictureBox1_MouseDown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseDown
q.Draw....

But I don't know how to make it freehand on MouseDown.
[Image: Imageaero.jpg?t=1303609442]
Reply
#2
(04-23-2011, 06:08 PM)Aero Wrote: I'm making a type of "Snippet" program that takes a screenshot of your, well screen obviously. Right now I have a capture, clear, and save button.
After the screenshot is captured I want to be able to Freehand draw on it but I can't seem to figure out how.
So far I have a small idea but I don't know what to do with it.
Underneath the public class-

Dim q As System.Drawing.Graphics

And in the picture box

Private Sub PictureBox1_MouseDown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseDown
q.Draw....

But I don't know how to make it freehand on MouseDown.

What do you mean by "freehand", do you mean when the mouse it attempting to draw on the picture or when it has already drawn on the picture?

[Image: t5BWm.png]
Reply
#3
Just like in paint. Left click and draw. No straight lines or circles or squares.
[Image: Imageaero.jpg?t=1303609442]
Reply
#4
Hmmm. Sounds like this could turn out pretty cool if you figure it out. Good luck.
Reply
#5
This is not the best way to do it.. but for the sake of simplicity I think this will work for you. Adjust the code accordingly to fit your needs

Code:
Public Class Form1
    Dim mDown As Boolean = False
    Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
        mDown = True
    End Sub
    Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
        mDown = False
    End Sub
    Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
        If mDown Then
            Me.Text = "down"
        Else
            Me.Text = "up"
        End If
    End Sub
End Class
Reply
#6
Check this out: http://www.dreamincode.net/forums/topic/...t-program/
Do not copy and paste! Learn from it!
[Image: just-cause-2-header.jpg]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Snippet] Autoclose Msgbox euverve 7 3,285 05-25-2011, 06:41 PM
Last Post: Pyratepig
  [Snippet] Check Email if gmail and valid password length euverve 4 1,815 05-20-2011, 06:51 AM
Last Post: stephen5565
  [Snippet] Get Local Getway euverve 1 1,026 05-16-2011, 07:56 PM
Last Post: KoBE
  [Snippet] Get OS Uptime euverve 0 877 05-12-2011, 07:08 PM
Last Post: euverve
  [Snippet] Random pick from list (Range) euverve 0 693 05-12-2011, 08:22 AM
Last Post: euverve

Forum Jump:


Users browsing this thread: 1 Guest(s)