[CrapCode] Codigo que tira rayos por los ojos.

Iniciado por 79137913, Febrero 07, 2013, 09:18:02 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

HOLA!!!

Estaba aburrido, y como nadie contesta el reto hice esto:
Código: vb
    'armen un form con:
    ' 2 shapes
    ' 2 lines
    ' 1 timer
    ' y denle a f5
     
    Private Sub Form_Load()
       Me.ScaleMode = vbPixels
       Me.ScaleHeight = 600
       Me.ScaleWidth = 800
       Shape1.Top = Me.ScaleHeight / 2 - 200
       Shape2.Top = Me.ScaleHeight / 2 - 200
       Shape1.Left = Me.ScaleWidth / 2 - 150
       Shape2.Left = Me.ScaleWidth / 2 + 150
       Shape1.Shape = 2
       Shape2.Shape = 2
       Shape1.Width = 150
       Shape2.Width = 150
       Shape1.Height = 300
       Shape2.Height = 300
       Line1.BorderColor = &HFF&
       Line2.BorderColor = &HFF&
       Line1.X1 = Shape1.Left + Shape1.Width / 2
       Line1.Y1 = Shape1.Top + Shape1.Height / 2
       Line2.X1 = Shape2.Left + Shape2.Width / 2
       Line2.Y1 = Shape2.Top + Shape2.Height / 2
       Timer1.Interval = 100
    End Sub
     
    Private Sub Timer1_Timer()
       Randomize
       neg = 1
       If Rnd() * 2 > 1 Then neg = -1
       Line1.X2 = Shape1.Left + Shape1.Width / 2 + Rnd() * 300 * neg
       neg = 1
       If Rnd() * 2 > 1 Then neg = -1
       Line1.Y2 = Shape1.Top + Shape1.Height / 2 + Rnd() * 300 * neg
       neg = 1
       If Rnd() * 2 > 1 Then neg = -1
       Line2.X2 = Shape2.Left + Shape2.Width / 2 + Rnd() * 300 * neg
       neg = 1
       If Rnd() * 2 > 1 Then neg = -1
       Line2.Y2 = Shape2.Top + Shape2.Height / 2 + Rnd() * 300 * neg
    End Sub
     


GRACIAS POR LEER!!!
"Algunos creen que soy un bot, puede que tengan razon"
"Como no se puede igualar a Dios, ya he decidido que hacer, ¡SUPERARLO!"
"La peor de las ignorancias es no saber corregirlas"

*Shadow Scouts Team*                                                No tienes permitido ver los links. Registrarse o Entrar a mi cuenta