Pintar Figura
Publicado por jimcov (5 intervenciones) el 18/02/2006 05:22:03
hola a todos
necesito saber como pintar una figura irregular en VB
aqui les dejo un ejemplo
Option Explicit
Dim x1 As Integer
Dim x2 As Integer
Dim y1 As Integer
Dim y2 As Integer
Private Sub Command1_Click()
x1 = 500: x2 = 1500: y1 = 500: y2 = 500
Line (x1, y1)-(x2, y2)
y2 = y2 + 1000: Line -(x2, y2)
x2 = x2 + 500: y2 = y2 + 500: Line -(x2, y2)
y2 = y2 + 1000: Line -(x2, y2)
x2 = x2 - 1000: Line -(x2, y2)
y2 = y2 - 1000: Line -(x2, y2)
x2 = x2 - 500: y2 = y2 - 500:: Line -(x2, y2)
x2 = 500: y2 = 500: Line -(x2, y2)
x2 = 200: Line -(x2, y2)
y2 = y2 + 1000: Line -(x2, y2)
x2 = x2 + 500: y2 = y2 + 500:: Line -(x2, y2)
y2 = y2 + 1000: Line -(x2, y2)
x2 = x2 + 300: Line -(x2, y2)
End Sub
gracias
jimcov
necesito saber como pintar una figura irregular en VB
aqui les dejo un ejemplo
Option Explicit
Dim x1 As Integer
Dim x2 As Integer
Dim y1 As Integer
Dim y2 As Integer
Private Sub Command1_Click()
x1 = 500: x2 = 1500: y1 = 500: y2 = 500
Line (x1, y1)-(x2, y2)
y2 = y2 + 1000: Line -(x2, y2)
x2 = x2 + 500: y2 = y2 + 500: Line -(x2, y2)
y2 = y2 + 1000: Line -(x2, y2)
x2 = x2 - 1000: Line -(x2, y2)
y2 = y2 - 1000: Line -(x2, y2)
x2 = x2 - 500: y2 = y2 - 500:: Line -(x2, y2)
x2 = 500: y2 = 500: Line -(x2, y2)
x2 = 200: Line -(x2, y2)
y2 = y2 + 1000: Line -(x2, y2)
x2 = x2 + 500: y2 = y2 + 500:: Line -(x2, y2)
y2 = y2 + 1000: Line -(x2, y2)
x2 = x2 + 300: Line -(x2, y2)
End Sub
gracias
jimcov
Valora esta pregunta


0