Visual Basic - Por favor, ayuda

Life is soft - evento anual de software empresarial
 
Vista:

Por favor, ayuda

Publicado por Cris (27 intervenciones) el 20/11/2006 13:03:59
Creo un programa de dibujo, meto una plantilla en blanco y negro para colorear en el form a lápiz, pero a la hora de pintar sobre ella tambien pinta la linea negra de la plantilla, no la respeta. ¿Cómo puedo evitarlo?. Gracias de antemano. Un saludo a todos
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Este es el codigo pero falla

Publicado por cris (27 intervenciones) el 20/11/2006 13:21:57
Dim PaintNow As Boolean 'Declara una variable.
Dim X1 As Long 'This Is The X Position Of The Last Line Drawn
Dim Y1 As Long 'This Is The Y Position Of The Last Line Drawn
Private Sub form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

PaintNow = True 'Activa el dibujo.
X1 = X
Y1 = Y
End Sub

Private Sub form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If PaintNow Then
Line (X1, Y1)-(X, Y)
X1 = X: Y1 = Y ' Dibuja un punto.
End If
End Sub

Private Sub form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
PaintNow = False
On Error Resume Next
X1 = 0
Y1 = 0
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar