www.pudn.com > vb-Polymorphic-interface.rar > ClsVolumeCheck.cls, change:2013-02-16,size:1022b


VERSION 1.0 CLASS 
BEGIN 
  MultiUse = -1  'True 
  Persistable = 0  'NotPersistable 
  DataBindingBehavior = 0  'vbNone 
  DataSourceBehavior  = 0  'vbNone 
  MTSTransactionMode  = 0  'NotAnMTSObject 
END 
Attribute VB_Name = "ClsVolumeCheck" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = True 
Attribute VB_PredeclaredId = False 
Attribute VB_Exposed = True 
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes" 
Attribute VB_Ext_KEY = "Top_Level" ,"Yes" 
'具体类 
'------------------ 
 
Option Explicit 
Private mVolume As Integer 
 
Public Event VolumeWarn() 
 
Public Sub VolumeCheck() 
  If CurVolume < 200 Or CurVolume > 240 Then 
     MsgBox ("引发事件VolumeWarn") 
     RaiseEvent VolumeWarn 
  End If 
 
End Sub 
 
Public Property Let CurVolume(ByVal vData As Variant) 
 
    If vData < 0 Then 
       MsgBox ("电压值为负,无法写入!") 
    Else 
       mVolume = vData 
    End If 
 
End Property 
 
Public Property Get CurVolume() As Variant 
 
    CurVolume = mVolume 
 
End Property