home *** CD-ROM | disk | FTP | other *** search
Visual Basic class definition | 2006-10-05 | 1012 b | 48 lines |
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "Newton"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- Dim U
- Dim a
-
- Public Property Let InitialVelocity(InitVel)
- U = InitVel
- End Property
-
- Public Property Get InitialVelocity()
- InitialVelocity = U
- End Property
-
- Public Property Let Accelleration(acc)
- a = acc
- End Property
-
- Public Property Get Accelleration()
- Accelleration = a
- End Property
-
- Public Function Distance(t)
- Distance = U * t + a * t * t / 2 ' S=Ut+1/2*at^2
- End Function
-
- Public Function Velocity(t)
- Velocity = U + a * t
- End Function
-
- Public Function Popup()
- MsgBox "Hi there", vbOKOnly, "testing"
- End Function
-
- Public Property Get Version()
- Version = "1.6"
- End Property
-