gambas-source-code/app/examples/Basic/Blights/.src/win1.class
Benoît Minisini c6a9cd69c2 [EXAMPLES]
* NEW: Add examples again. I hope correctly this time.


git-svn-id: svn://localhost/gambas/trunk@6726 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-12-12 19:58:52 +00:00

36 lines
637 B
Text

' Gambas class file
Public Sub Timer1_Timer()
Dim diode As PictureBox
Dim l As Integer
For Each diode In [l1, l2, l3, l4, l5, l6, l7, l8]
l = Rnd() * 2
If l = 0 Then
diode.Picture = Picture["bloff.xpm"]
Else
diode.Picture = Picture["blon.xpm"]
Endif
Next
End
Public Sub Form_Open()
Dim hPict As Picture
Dim diode As PictureBox
hPict = Picture["blon.xpm"]
For Each diode In [l1, l2, l3, l4, l5, l6, l7, l8]
diode.Resize(hPict.Width, hPict.Height)
diode.Background = Color.DarkGreen
Next
Me.Resize(hPict.W * 8 + Me.W - Me.ClientW, hPict.H + Me.H - Me.ClientH)
End