打印本文 打印本文 关闭窗口 关闭窗口
在vb中实现真正锁定的带自定义菜单的文本控件
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1951  更新时间:2009/4/23 16:38:07  文章录入:mintao  责任编辑:mintao
Property

Private Sub uTextBox_Change()
    RaiseEvent Change
End Sub

Public Property Set Menu(ByRef vNewValue As Menu)
    Set m_Menu = vNewValue
End Property

Public Property Get Menu() As Menu
    Set Menu = m_Menu
End Property

Public Property Let MaxLength(ByVal vNewValue As Integer)
    Let m_MaxLength = vNewValue
    Let uTextBox.MaxLength = vNewValue
End Property

Public Property Get MaxLength() As Integer
    Let MaxLength = m_MaxLength
End Property

Public Property Let SelLength(ByVal vNewValue As Integer)
    ''''Let m_SelLength = vNewValue
    Let uTextBox.SelLength = vNewValue
End Property

Public Property Get SelLength() As Integer
    Let SelLength = uTextBox.SelLength
End Property

Public Property Let SelStart(ByVal vNewValue As Integer)
    Let uTextBox.SelStart = vNewValue
End Property

Public Property Get SelStart() As Integer
    Let SelStart = uTextBox.SelStart
End Property

Public Property Let SelText(ByVal vNewValue As String)
    Let uTextBox.SelText = vNewValue
End Property

Public Property Get SelText() As String
    Let SelText = uTextBox.SelText
End Property

''''Public Property Let MulitLine(ByVal vNewValue As Boolean)
''''    Let uTextBox.MultiLine = vNewValue
''''End Property

''''Public Property Get MultiLine() As Boolean
''''    Let MulitLine = uTextBox.MulitLine
''''End Property

''''Public Property Let ScrollBars(ByVal vNewValue As VBRUN.ScrollBarConstants)
''''    Let uTextBox.ScrollBars = vNewValue
''''End Property

''''Public Property Get ScrollBars() As VBRUN.ScrollBarConstants
''''    Let ScrollBars = uTextBox.ScrollBars
''''End Property

Public Property Let Enabled(ByVal vNewValue As Boolean)
    Let m_Enabled = vNewValue
    Let uTextBox.Enabled = vNewValue
    Let UserControl.Enabled = vNewValue
End Property

Public Property Get Enabled() As Boolean
    Let Enabled = m_Enabled
End Property


''''将前面模块中的代码保留


''''新建一个窗体,看现在这个自定义的真正锁定的文本控件如何?


 

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口