Hello!
I have problems with this code:
VB Code:
Public Interface IPhone Enum CallState As Integer Idle Dialing Ringing Speaking End Enum Enum CallResult As Integer Normal NoCustomer NoRing [Error] End Enum Sub Dial(ByVal telephoneNo As String) Sub Hangup() Property State() As CallState Property LastResult() As CallResult End Interface Public Class MyPhone Inherits Form1 Implements IPhone Dim linea As AxetTT37.AxetLine Dim CallState As IPhone.CallState Private _state As IPhone.CallState = CallState.Idle Public Sub [New]() linea = New AxetTT37.AxetLine linea.DeviceName = "AVM ISDN TAPI Services (Cntrl 1)" linea.DeviceActive = True End Sub ReadOnly Property State() As IPhone.CallState Implements IPhone.State Get Return _state End Get End Property Public Sub Dial(ByVal telephoneNo As String) Implements IPhone.Dial linea.CallPhoneNumber = telephoneNo linea.CallDial() _state = CallState.Dialing End Sub Public Sub Hangup() Implements IPhone.Hangup If linea.CallActive Then linea.CallHangup() linea.CallActive = False _state = CallState.Idle End If End Sub End Class
1. I get these errors:
In line: ReadOnly Property State() As IPhone.CallState Implements IPhone.State i got underlined IPhone.State() ->
IPhone.State in State()
Property: 'State' cannot implement 'State' because there is no matching property
on Interface 'Iphone'
- underlined IPhone when i define the class -> MyPhone must implement 'Propery State() As CallState' for interface Iphone
How can i fix that?
2. How can I access [New], Dial from class MyPhone in any other Form
(like Form1...)?
tnx for help




Reply With Quote