Visual Basic NET ( 3)


- 3


Private x As Double '

' -

Public ReadOnly Property X() As Double

Get

Return x

End Get

End Property

 

Private y As Double '

' -

Public ReadOnly Property Y() As Double

Get

Return y

End Get

End Property

 

Private Enum '

End Enum

Private As

 

Public Sub New()

.pict.Width = _

.pict.Height = _

End Sub

Public Sub _() '

= .

x = ..Left + ..Width * 1 / 4

y = ..Top + ..Height / 2

____()

End Sub

Private Sub ____()

.pict.Left = x

.pict.Top = y

End Sub

Public Sub () ' ,

' , :

If __() Then _()

_____() '

End Sub

 

Private Function __() As Boolean

' , , :

If y < ..Top Or y + _ > ..Top + ..Height _

Or x < ..Left Or x + _ > ..Left + ..Width Then