PDA

View Full Version : how to use class interface&objects



xena2305
03-04-2012, 02:32 PM
Hi,
I'm tring to use OOP to build a simple code.
i want to build a program that will place a message on the screen
with a name of shape(circle, line).
i have class interface that define property "shape" and method "draw".

public shape As String
Public Sub draw()
End Sub



circle class:

Implements Idraw
Private Property Get Idraw_shape() As String
Idraw_shape = "Crcle"
End Property

Private Property Let Idraw_shape(ByVal RHS As String)
'
End Property

Private Sub Idraw_draw()
MsgBox (Idraw_shape)
End Sub



and another similar "line" class.
what am i doing wrong, how can i run a circle class to get the circle message on the screen.