VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsPyth"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
' Objekt Pythagoras
Option Explicit

Dim m_a As Double            ' Kathete a
Dim m_b As Double            ' Kathete b
Dim m_c As Double            ' Hypotenuse c

Public Property Get a() As Double     ' Lesen der Kathete a -Eigenschaft
  a = m_a
End Property

Public Property Let a(dNeua As Double)  ' Zuweisen der Kathete a - Eigenschaft
  m_a = dNeua
End Property

Public Property Get b() As Double    ' Lesen der Kathete b - Eigenschaft
  b = m_b
End Property

Public Property Let b(dNeub As Double) ' Zuweisen der Kathete b - Eigenschaft
  m_b = dNeub
End Property

Public Property Get c() As Double    ' Lesen der Hypotenuse c - Eigenschaft
 c = m_c
End Property

Public Property Let c(dNeuc As Double) ' Zuweisen der Hypotenuse c - Eigenschaft
 m_c = dNeuc
End Property

Public Sub Rechne_m_Sub()          ' Methoden - Definition
 If Form1.Option1(0) Then
    m_c = Sqr(a ^ 2 + b ^ 2)
    Form1.Text1(2) = Trim(Str(m_c))
 ElseIf Form1.Option1(1) Then
    m_b = Sqr(c ^ 2 - a ^ 2)
    Form1.Text1(1) = Trim(Str(m_b))
 Else
    m_a = Sqr(c ^ 2 - b ^ 2)
    Form1.Text1(0) = Trim(Str(m_a))
 End If
End Sub

Public Function Rechne_m_Funktion()
If Form1.Option1(0) Then
    m_c = Sqr(a ^ 2 + b ^ 2)
    Form1.Text1(2) = Trim(Str(m_c))
 ElseIf Form1.Option1(1) Then
    m_b = Sqr(c ^ 2 - a ^ 2)
    Form1.Text1(1) = Trim(Str(m_b))
 Else
    m_a = Sqr(c ^ 2 - b ^ 2)
    Form1.Text1(0) = Trim(Str(m_a))
 End If
End Function
