Guest User

Untitled

a guest
Apr 23rd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.48 KB | None | 0 0
  1.     Private Sub form1_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
  2.         position(0, 0) = lbl1
  3.         position(0, 1) = lbl2
  4.         position(0, 2) = lbl3
  5.         position(1, 0) = lbl4
  6.         position(1, 1) = lbl5
  7.         position(1, 2) = lbl6
  8.         position(2, 0) = lbl7
  9.         position(2, 1) = lbl8
  10.         position(2, 2) = lbl9
  11.  
  12.  
  13.         lbl(1) = lbl1
  14.         lbl(2) = lbl2
  15.         lbl(3) = lbl3
  16.         lbl(4) = lbl4
  17.         lbl(5) = lbl5
  18.         lbl(6) = lbl6
  19.         lbl(7) = lbl7
  20.         lbl(8) = lbl8
  21.         lbl(9) = lbl9
  22.  
  23.  
  24.         lblBoard2(2, 2) = lblBoard
  25.  
  26.         s(1) = lblH1
  27.         s(2) = lblh2
  28.         s(3) = lblH3
  29.         s(4) = lblh4
  30.         s(5) = lblh5
  31.         s(6) = lblH6
  32.         s(7) = lblH7
  33.         s(8) = LblH8
  34.         s(9) = lblH9
  35.  
  36.         For i = 1 To 9
  37.             lbl(i).Visible = False
  38.         Next
  39.  
  40.         For i = 1 To 9
  41.             lbl(i).Text = 0
  42.         Next
  43.  
  44.         Dim rand As New Random
  45.         Randomize()
  46.         Dim found As Boolean
  47.         Dim position2 As Integer
  48.  
  49.         For i = 1 To 9
  50.             found = False
  51.             Do
  52.                 position2 = 1 + rand.Next(9)
  53.                 If lbl(position2).Text = 0 Then
  54.                     lbl(position2).Text = i
  55.                     found = True
  56.                 End If
  57.             Loop Until found
  58.         Next
  59.  
  60.         Dim k As Integer
  61.         For k = 1 To 9
  62.             s(k).Top =  
  63.  
  64.         Next
  65.     End Sub
Add Comment
Please, Sign In to add comment