miércoles, 4 de noviembre de 2009

Gambas

menuprincipal


PUBLIC SUB inventario_Click()
FMain.Show
END
PUBLIC SUB salir_Click()
ME.Close
END
PUBLIC SUB usuarios_Click()
usuario.Show
END
PUBLIC SUB Form_Open()
ME.Center
modulo.conectar
END
protector
Este formulario tiene 1 DrawingArea, 1 Button, y un timer.

PUBLIC x AS Integer
PUBLIC y AS Integer
PUBLIC r AS Integer
PUBLIC g AS Integer
PUBLIC b AS Integer
PUBLIC SUB Button1_Click()
Timer1.Enabled = TRUE
END
PUBLIC SUB Timer1_Timer()
x = Int(Rnd * 800)
y = Int(Rnd * 600)
r = Int(Rnd * 255)
g = Int(Rnd * 255)
b = Int(Rnd * 255)
Draw.Begin(area1)
Draw.FillColor = Color.Red
Draw.FillColor = Color.RGB(r, g, b)
Draw.FillStyle = Fill.Solid
Draw.Circle(x, y, 80)
Draw.Circle(200, 200, 80)
Draw.Rect(100, 100, 100, 50)
Draw.End
END

No hay comentarios:

Publicar un comentario