home *** CD-ROM | disk | FTP | other *** search
Visual Basic class definition | 1997-01-29 | 2.3 KB | 82 lines |
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "TestClass"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- Option Explicit
- ' >>╫ε║├╘┌í░╚½─ú┐Θ▓Θ┐┤í▒─ú╩╜╧┬╘─╢┴íú<<
- '
- ' ┤µ┤ó╡≈╩╘▒Ω╩╢║┼íú
- Private mlngDebugID As Long
- Implements IDebug
-
- ' ╦╜╙╨╡─┤µ┤ó╡─╙├╗º╢¿╥σ└α╨═(UDT)ú¼╙├└┤╘┌╢╘╧≤╓«╝Σ┤½╡▌íú
- ' UDT ╘┌▒Ω╫╝─ú┐Θ╓╨▒╪╨δ╔∙├≈╬¬ Publicíú(▓╬╝√ modFriends).
- ' (╘┌▒╛└²╓╨ú¼ mDemo ╝╚┤µ┤ó Demo ╩⌠╨╘╙╓┤µ┤ó GetDemo/SetDemo Function/Sub ╢╘íú)
- Private mDemo As udtDEMO
-
- ' Demo ╩⌠╨╘ú║ Demo ╩⌠╨╘╡─ Property Get ║═ Let
- ' ----------- ╧╘╩╛╙├ Friend ╣╪╝ⁿ╫╓╔∙├≈╡─╩⌠╨╘╣²│╠╚τ║╬─▄╣╗╜╙╩▄▓ó╖╡╗╪╥╗╕÷ UDTíú
- Friend Property Get Demo() As udtDEMO
- Demo = mDemo
- End Property
- ' ╫ó╥Γú║Property Let ╡─▓╬╩²▒╪╨δ╩╟╢╘ UDT ╡─░┤╡╪╓╖╥²╙├(ByRef)íú
- Friend Property Let Demo(NewDemo As udtDEMO)
- mDemo = NewDemo
- End Property
-
- ' GetDemo ╝░ SetDemo ╧╘╩╛╙╤╘¬║»╩²╚τ║╬─▄╣╗╖╡╗╪ UDTú¼
- ' ------------------- UDT ╚τ║╬─▄╣╗│╔╬¬╙╤╘¬╣²│╠╡─▓╬╩²íú
- Friend Function GetDemo() As udtDEMO
- GetDemo = mDemo
- End Function
- ' ╫ó╥Γú║╥╗╕÷╣²│╠╡─ UDT ▓╬╩²▒╪╨δ╔∙├≈╬¬ ByRefíú
- Friend Sub SetDemo(NewDemo As udtDEMO)
- mDemo = NewDemo
- End Sub
-
- ' SetDemoParts ╩╟╙├└┤╠ε╨┤ UDT ╘¬╦╪╡─╕¿╓·╖╜╖¿ú¼
- ' ------------ ╦∙╥╘╛═╙╨┴╦╥╗╨⌐╥¬┤½╡▌╡──┌╚▌íú
- ' ╘┌╩╡╝╩│╠╨≥╓╨ú¼UDT ╡─╘¬╦╪╜½═¿╣² TestClass ╢╘╧≤╓╨╡─┤·┬δ▒╗╠ε╨┤íú
- Public Sub SetDemoParts(ByVal A As Integer, _
- ByVal B As Long, ByVal C As String)
- mDemo.intA = A
- mDemo.lngB = B
- mDemo.strC = C
- End Sub
-
- ' ShowDemo ╧╘╩╛ UDT ╡─╘¬╦╪ú¼╦∙╥╘┐╔╥╘╘┌░╤ UDT ┤½╡▌╡╜╡┌╢■╕÷╢╘╧≤╓«║≤Σ»└└╓«íú
- ' --------
- Public Sub ShowDemo(ByVal Title As String, _
- ByVal Direction As String)
-
- MsgBox Direction & " " _
- & GetDebugString(Me) & vbCrLf & vbCrLf _
- & mDemo.intA & vbCrLf _
- & mDemo.lngB & vbCrLf _
- & mDemo.strC, , Title
- End Sub
-
- Private Sub Class_Initialize()
- mlngDebugID = DebugInit(Me)
- End Sub
-
- Private Sub Class_Terminate()
- DebugTerm Me
- End Sub
-
- ' -------- IDebug ╩╡╧╓ --------
- '
- ' IDebug.DebugID ╧≥─·╠ß╣⌐╥╗╓╓╩╢▒≡╢╘╧≤╡─╖╜╖¿íú
- ' ====== ------- ╦ⁿ╩╟ modFriend ╓╨╔∙├≈╡─ DebugInitíóDebugTerm
- ' ║═ DebugShow ╡≈╩╘╣²│╠╦∙╥¬╟≤╡─íú
- '
- Private Property Get IDebug_DebugID() As Long
- IDebug_DebugID = mlngDebugID
- End Property
-
-