Questo è il codice, ovviamente non è definitivo,
Dim mill As Integer
Dim min As Integer = 0
Dim ora As Integer = 0
Dim giorno As Integer = 0
' X LINEA 780
' Y COLONNA 1340
' BIT TOTALI 1.045.200
' massima combinazione su 32 bit 4.294.967.296
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
RichTextBox1.Visible = False
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
' Dim threadSecondariiio As System.Threading.Thread
' threadSecondariiio = New Threading.Thread(AddressOf Crono.)
' threadSecondariiio.Start()
Dim variabile As Integer = 0
Dim position As Integer = 0
Dim g As Graphics = PictureBox1.CreateGraphics
Dim num As Integer
Dim resto As Integer
Dim cont As Integer = 1
Dim colore As Pen = Pens.Black
Dim constante As Integer = 2
Dim temporealesec As Integer
For pos = 1 To 32 Step 1
Controls("TextBox" & pos).Text = ""
Controls("TextBox" & pos).Refresh()
Next
Do Until Val(Mid(TimeString(), 7, 8)) = 0
TextBox36.Text = Mid(TimeString(), 7, 8)
TextBox36.Refresh()
RichTextBox1.Visible = True
RichTextBox1.Refresh()
RichTextBox1.Text = " SINCRONIZZAZIONE OROLOGIO DI SISTEMA " & Environment.NewLine
RichTextBox1.AppendText(" " & 60 - Mid(TimeString(), 7, 8))
Loop
RichTextBox1.Visible = False
Me.Refresh()
temporealesec = Val(Mid(TimeString(), 7, 8))
For num = 1 To 250 * 2 Step 1
cont = num 'Val(TextBox33.Text) * 2
Do Until cont = 1
cont = Int(cont / 2)
resto = Val(cont Mod 2)
position = position + 1
' Controls(" TextBox" & position - 1). = Refresh()
Controls("TextBox" & position).Refresh()
Controls("TextBox" & position - 1).Text = resto.ToString
If resto = 0 Then
colore = Pens.White
Else
colore = Pens.Black
End If
temporealesec = Val(Mid(TimeString(), 7, 8))
If temporealesec = 59 Then
End If
TextBox34.Text = temporealesec
TextBox34.Refresh()
If TextBox34.Text = 59 Then
For sincr = 1 To 700000000
Next
min += 1
TextBox35.Text = min
TextBox35.Refresh()
End If
TextBox33.Text = num.ToString
TextBox33.Refresh()
g.DrawEllipse(colore, position, 1, 1, 1)
Loop
position = 1
Next
End Sub
End Class