⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userlabel.ctl

📁 齐鲁石化某分公司的数据采集管理系统
💻 CTL
字号:
VERSION 5.00
Begin VB.UserControl UserLabel 
   ClientHeight    =   450
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4035
   ScaleHeight     =   450
   ScaleWidth      =   4035
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   360
      TabIndex        =   4
      Top             =   0
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.ComboBox Combo1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Left            =   2760
      TabIndex        =   3
      Text            =   "左对齐"
      Top             =   0
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1320
      TabIndex        =   1
      Top             =   0
      Width           =   735
   End
   Begin VB.CheckBox Check1 
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "字符"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2160
      TabIndex        =   2
      Top             =   0
      Width           =   495
   End
End
Attribute VB_Name = "UserLabel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Private Sub Check1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        Text2.Visible = True
        Text2.ZOrder 0
        Text2.text = Check1.Caption
        Text2.SetFocus
        Text2.SelLength = Len(Text2.text)
    End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        Check1.Caption = Text2.text
        Text2.Visible = False
    End If
End Sub

Private Sub Text2_LostFocus()
    Text2.Visible = False
End Sub

Private Sub UserControl_Initialize()
    Combo1.AddItem "左对齐"
    Combo1.AddItem "居中"
    Combo1.AddItem "右对齐"
End Sub

Public Function CheckEdit(intCheck As Integer)
    Check1.Value = intCheck
End Function

Public Function CheckCaptionEdit(stringCaption As String)
    Check1.Caption = stringCaption
End Function
Public Function LabelEdit(stringCaption As String)
    Label1.Caption = stringCaption
End Function

Public Function TextEdit(stringText As String)
    Text1.text = stringText
End Function

Public Function ComboEdit(stringCombo As String)
    Combo1.text = stringCombo
End Function

Public Function GetCheckCaption() As String
    GetCheckCaption = Check1.Caption
End Function

Public Function GetCheckValue() As Integer
    GetCheckValue = Check1.Value
End Function

Public Function GetTextCaption() As String
    GetTextCaption = Text1.text
End Function

Public Function GetComboCaption() As String
    GetComboCaption = Combo1.text
End Function

Public Property Let comboVisible(visibled As Boolean)
    Combo1.Visible = visibled
End Property

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -