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

📄 usertemplate.ctl

📁 齐鲁石化某分公司的数据采集管理系统
💻 CTL
字号:
VERSION 5.00
Begin VB.UserControl UserTemplate 
   BackColor       =   &H00E0E0E0&
   ClientHeight    =   630
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   1785
   ScaleHeight     =   630
   ScaleWidth      =   1785
   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            =   360
      TabIndex        =   1
      TabStop         =   0   'False
      Top             =   120
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.CheckBox Check1 
      BackColor       =   &H00FFC0C0&
      Enabled         =   0   'False
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   120
      TabIndex        =   0
      TabStop         =   0   'False
      Top             =   120
      Width           =   1575
   End
End
Attribute VB_Name = "UserTemplate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Dim CheckCaptionChanged As Boolean

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

Private Sub Combo1_LostFocus()
    Combo1.Visible = False
End Sub

Private Sub UserControl_Click()
    If Check1.Value = 1 Then
        Check1.Value = 0
    Else
        Check1.Value = 1
    End If
End Sub

Private Sub UserControl_Initialize()
    Combo1.AddItem "货名"
    Combo1.AddItem "发货单位"
    Combo1.AddItem "收货单位"
    Combo1.AddItem "发站"
    Combo1.AddItem "到站"
End Sub

Public Property Let Value(checkValue As Integer)
    Check1.Value = checkValue
End Property

Public Property Get Value() As Integer
    Value = Check1.Value
End Property

Public Property Let Enable(checkEnabled As Boolean)
    Check1.Enabled = checkEnabled
End Property

Public Property Get Enable() As Boolean
    Enable = Check1.Enabled
End Property


Public Property Let sCaption(checkCaption As String)
    Check1.Caption = checkCaption
End Property

Public Property Get sCaption() As String
    sCaption = Check1.Caption
End Property

Private Sub UserControl_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        Combo1.Visible = True
        Combo1.SetFocus
    End If
End Sub

⌨️ 快捷键说明

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