I тарау. Объектілі бағдарлы программалау объект ұғымы


' сақтау үшін локальды ауыспалылар



бет18/25
Дата06.02.2022
өлшемі0,87 Mb.
#79285
түріПрограмма
1   ...   14   15   16   17   18   19   20   21   ...   25
Байланысты:
ОБП
мультимедиа
' сақтау үшін локальды ауыспалылар
' Қасиет мәндері
Private mvarR As Integer
Private ravarX As Integer
Private xnvarY As Integer
Private mvarColor As Long
Public Sub ChangeColor(NewColor As Long)
Color = NewColor
Draw
End Sub
Public Sub Move(XStep As Integer, _
YStep As Integer)
Forml.Circle (X, Y), R, Forml.BackColor
X = X + XStep
Y = Y + YStep
Draw
End Sub
Public Sub Draw()
Forml.Circle (X, Y), R, Color
End Sub
Public Property Let Color(ByVal vData _
As Long)
'Syntax: X.Color = 5
mvarColor = vData
End Property
Public Property Get Color() As Long
'Syntax: Debug.Print X.Color
Color = mvarColor
End Property
Public Property Let Y(ByVal vData _
As Integer) 'Syntax: X.Y = 5
mvarY = vData
End Property
Public Property Get Y() As Integer
'Syntax: Debug.Print X.Y
Y = mvarY
End Property
Public Property Let X(ByVal vData_
As Integer)
'Syntax: X.X =5
mvarX = vData
End Property
Public Property Get X() As Integer
'Syntax: Debug.Print X.X


Достарыңызбен бөлісу:
1   ...   14   15   16   17   18   19   20   21   ...   25




©engime.org 2024
әкімшілігінің қараңыз

    Басты бет