Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Using Picture Boxes


  • Please log in to reply
1 reply to this topic

#1 TH0RN

TH0RN

  • Members
  • 28 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:01:46 PM

Posted 25 October 2008 - 07:37 PM

In VB 6.0, I am making an application that is similar to paint. I have made some code that makes a dot appear when you click and move. This appears below:

Private Sub picpaint_MouseDown(Button As Integer, Shift As Integer, X As Single, y As Single)
Well = True
picpaint.PSet (X, y)
End Sub

Private Sub picpaint_MouseMove(Button As Integer, Shift As Integer, X As Single, y As Single)
If Well = True Then
picpaint.PSet (X, y)
End If
End Sub

Private Sub picpaint_MouseUp(Button As Integer, Shift As Integer, X As Single, y As Single)
Well = False
End Sub

This, however, makes a circular dot. Is there any way that I can make this dot a square?

BC AdBot (Login to Remove)

 


m

#2 Keithuk

Keithuk

  • Members
  • 951 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:03:46 AM

Posted 01 November 2008 - 10:39 AM

Is there any way that I can make this dot a square?


I have a little painter app will allow you to draw circles, rectangles, rectangles with round edges, floodfill and lines with all the difference colours and thicknesses you want to use. But I can't upload it here for some reason. :flowers:

If you are new to VB then I would suggest you join a VB only forum there are loads about, read my sig. :thumbsup:

Keith

Windows ME (spare computer)
Windows XP 2002 Professional SP3 (desktop computer)
Windows 7 Professional SP1 32bit (laptop computer)

Windows 8 64bit spare drive for laptop computer





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users