- VERSION 5.00
- Begin VB.UserControl QQText
- ClientHeight = 3840
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 6975
- ScaleHeight = 3840
- ScaleWidth = 6975
- ToolboxBitmap = "QQText.ctx":0000
- Begin VB.TextBox Text1
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 70
- TabIndex = 0
- Text = "F5_cyclone"
- Top = 70
- Width = 4780
- End
- Begin VB.Image img
- Height = 390
- Left = 0
- Picture = "QQText.ctx":0312
- Top = 1800
- Width = 4890
- End
- Begin VB.Image Image3
- Height = 390
- Left = 0
- Picture = "QQText.ctx":66DC
- Top = 3000
- Visible = 0 'False
- Width = 4890
- End
- Begin VB.Image Image2
- Height = 390
- Left = 0
- Picture = "QQText.ctx":CAA6
- Top = 2280
- Visible = 0 'False
- Width = 4890
- End
- Begin VB.Image Image1
- Height = 390
- Left = 0
- Picture = "QQText.ctx":12E70
- Stretch = -1 'True
- Top = 15
- Width = 4890
- End
- End
- Attribute VB_Name = "QQText"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- ' **********************************************************************
- ' 描 述:一组QQ风格控件
- ' 由本人收集整理 http://www.qq.com
- ' **********************************************************************
- Dim mLocked, mEnabled, nc As Boolean
- Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- If mEnabled = True Then
- Image1.Left = 0
- Image1.Top = 10
- Image1.Picture = Image2.Picture
- End If
- End Sub
- Private Sub UserControl_Initialize()
- Text1.Left = 70
- Text1.Top = 70
- Call UserControl_Resize
- Text1.Text = "Text"
- End Sub
- Private Sub Lockedchs()
- If mLocked = False Then
- Text1.Locked = False
- Else
- Text1.Locked = True
- End If
- End Sub
- Private Sub CheckEnabled()
- If mEnabled = True Then
- Text1.Enabled = True
- Image1.Picture = Image3.Picture
- Else
- Text1.Enabled = False
- Image1.Picture = img.Picture
- End If
- End Sub
- Private Sub nChange()
- If nc = True Then
- Text1.Left = 25
- Text1.Top = 40
- Text1.Width = UserControl.Width - 125
- Text1.Height = UserControl.Height - 90
- Text1.BackColor = &HF0F0F0
- Text1.Locked = True
- Else
- Text1.Left = 70
- Text1.Top = 70
- Call UserControl_Resize
- Text1.BackColor = &H80000005
- Text1.Locked = False
- End If
- End Sub
- Private Sub MultiLinechs()
- If mMultiLine = True Then
- Text1.MultiLine = True
- Else
- Text1.MultiLine = False
- End If
- End Sub
- Public Property Get Text() As String
- Text = Text1.Text
- End Property
- Public Property Let Text(ByVal New_Text As String)
- Text1.Text() = New_Text
- PropertyChanged "Text"
- End Property
- Public Property Get MaxLength() As Long
- MaxLength = Text1.MaxLength
- End Property
- Public Property Let MaxLength(ByVal New_MaxLength As Long)
- Text1.MaxLength = New_MaxLength
- If New_MaxLength > 0 Then
- If Len(Text1.Text) > New_MaxLength Then Text1.Text = Left(Text1.Text, New_MaxLength)
- End If
- PropertyChanged "MaxLength"
- End Property
- Public Property Get BackColor() As OLE_COLOR
- BackColor = Text1.BackColor
- End Property
- Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
- Text1.BackColor() = New_BackColor
- PropertyChanged "BackColor"
- End Property
- Public Property Get ForeColor() As OLE_COLOR
- ForeColor = Text1.ForeColor
- End Property
- Public Property Let ForeColor(ByVal NewForeColor As OLE_COLOR)
- Text1.ForeColor = NewForeColor
- PropertyChanged "ForeColor"
- End Property
- Public Property Get Locked() As Boolean
- Locked = Text1.Locked
- End Property
- Public Property Let Locked(ByVal NewLocked As Boolean)
- Text1.Locked() = NewLocked: mLocked = NewLocked: Lockedchs
- PropertyChanged "Locked"
- End Property
- Public Property Get Enabled() As Boolean
- Enabled = Text1.Enabled
- End Property
- Public Property Let Enabled(ByVal NewEnabled As Boolean)
- Text1.Enabled() = NewEnabled: mEnabled = NewEnabled: CheckEnabled
- PropertyChanged "Enabled"
- End Property
- Public Property Get NeverChange() As Boolean
- NeverChange = nc
- End Property
- Public Property Let NeverChange(ByVal NewNeverChange As Boolean)
- nc = NewNeverChange: nChange
- PropertyChanged "NeverChange"
- End Property
- Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- If mEnabled = True Then
- Image1.Left = 5
- Image1.Top = 10
- Image1.Picture = Image3.Picture
- End If
- End Sub
- Private Sub UserControl_Resize()
- If Image1.Width < 255 And Image1.Height < 255 Then
- Image1.Width = 255
- Image1.Height = 255
- UserControl.Height = 285
- UserControl.Width = 285
- Text1.Width = Image1.Width - 70
- Text1.Height = Image1.Height - 60
- Else
- Image1.Height = UserControl.Height - 30
- Image1.Width = UserControl.Width - 30
- Text1.Width = Image1.Width - 110
- Text1.Height = Image1.Height - 90
- End If
- End Sub