Results 1 to 4 of 4

Thread: Problems

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2000
    Posts
    17

    Exclamation

    Im trying to make a program that allows a user to draw "free-hand" images with the mouse in a PictureBox. The user should also be aloud to select a color as well as a pen size. If anyone has an idea as to how to do this i would greatly appreciate it. Thanks for your help and you may e-mail me at [email protected]

  2. #2
    Guest
    Is this what your looking for?

    Code:
    Public A, B As Integer
    
    
    Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = 1 Then Picture1.Line (A, B)-(X, Y)
        A = X: B = Y
    End Sub
    
    
    Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = 1 Then Picture1.Line (X, Y)-(X + 15, Y + 15)
    End Sub

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2000
    Posts
    17

    your the best thanks!!

    that is exactly what i am looking for thank you so much now i only have a few more labs to do...Thank you so much for your help you dont know how much it means

  4. #4
    Guest
    To change the color of the line, change the Picturebox's ForeColor.
    To change the size of the line, change the Picturebox's DrawWidth.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width