Visual Basic NET ( 2)



14.4.5. , .


, . . :

  • , (, , , )
  • . . , .

    Dim , , As Integer

    ' , :

    Dim _ As Boolean

    Private Sub ___Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _

    Handles __.Click

    '

    Me.KeyPreview = True '

    _ = False ' , ,

    = 0 : = 0 : = 0 ' -

    lbl_.Text = "" '

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

    __()

    _()

    _____()

    .Left = x : .Top = y

    _()

    End Sub

    Sub __()

    Dim __ As Color = .GetPixel(x, y)

    If __.ToArgb = Color.Green.ToArgb And Not < 1 _

    Then = 1 '

    If __.ToArgb = Color.Red.ToArgb _

    Then () : lbl_.Text = "!"