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

📄 ctladdress.ctl

📁 《VB6数据库开发指南》所有的例程的源码
💻 CTL
字号:
VERSION 5.00
Begin VB.UserControl ctlAddress 
   ClientHeight    =   2325
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   5445
   ScaleHeight     =   2325
   ScaleWidth      =   5445
   Begin VB.TextBox txtFirstName 
      Height          =   375
      Left            =   120
      TabIndex        =   5
      Top             =   360
      Width           =   2535
   End
   Begin VB.TextBox txtLastName 
      Height          =   375
      Left            =   2760
      TabIndex        =   4
      Top             =   360
      Width           =   2535
   End
   Begin VB.TextBox txtAddress 
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   1080
      Width           =   5175
   End
   Begin VB.TextBox txtCity 
      Height          =   375
      Left            =   120
      TabIndex        =   2
      Top             =   1800
      Width           =   2535
   End
   Begin VB.TextBox txtState 
      Height          =   375
      Left            =   2760
      TabIndex        =   1
      Top             =   1800
      Width           =   855
   End
   Begin VB.TextBox txtZip 
      Height          =   375
      Left            =   3720
      TabIndex        =   0
      Top             =   1800
      Width           =   1575
   End
   Begin VB.Label lblFirstName 
      Caption         =   "First"
      Height          =   375
      Left            =   120
      TabIndex        =   11
      Top             =   120
      Width           =   1935
   End
   Begin VB.Label lblLastName 
      Caption         =   "Last"
      Height          =   375
      Left            =   2760
      TabIndex        =   10
      Top             =   120
      Width           =   1335
   End
   Begin VB.Label lblAddress 
      Caption         =   "Address"
      Height          =   255
      Left            =   120
      TabIndex        =   9
      Top             =   840
      Width           =   2175
   End
   Begin VB.Label lblCity 
      Caption         =   "City"
      Height          =   375
      Left            =   120
      TabIndex        =   8
      Top             =   1560
      Width           =   1695
   End
   Begin VB.Label lblState 
      Caption         =   "State"
      Height          =   255
      Left            =   2760
      TabIndex        =   7
      Top             =   1560
      Width           =   855
   End
   Begin VB.Label lblZip 
      Caption         =   "Zip Code"
      Height          =   375
      Left            =   3720
      TabIndex        =   6
      Top             =   1560
      Width           =   1575
   End
End
Attribute VB_Name = "ctlAddress"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Private Sub UserControl_Resize()
    If Height <> 2325 Then
        Height = 2325
    End If
    If Width <> 5445 Then
        Width = 5445
    End If
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=txtFirstName,txtFirstName,-1,Text
Public Property Get FirstName() As String
Attribute FirstName.VB_Description = "Returns/sets the text contained in the control."
Attribute FirstName.VB_MemberFlags = "14"
    FirstName = txtFirstName.Text
End Property

Public Property Let FirstName(ByVal New_FirstName As String)
    txtFirstName.Text() = New_FirstName
    PropertyChanged "FirstName"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=txtLastName,txtLastName,-1,Text
Public Property Get LastName() As String
Attribute LastName.VB_Description = "Returns/sets the text contained in the control."
Attribute LastName.VB_MemberFlags = "14"
    LastName = txtLastName.Text
End Property

Public Property Let LastName(ByVal New_LastName As String)
    txtLastName.Text() = New_LastName
    PropertyChanged "LastName"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=txtAddress,txtAddress,-1,Text
Public Property Get Address() As String
Attribute Address.VB_Description = "Returns/sets the text contained in the control."
Attribute Address.VB_MemberFlags = "14"
    Address = txtAddress.Text
End Property

Public Property Let Address(ByVal New_Address As String)
    txtAddress.Text() = New_Address
    PropertyChanged "Address"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=txtCity,txtCity,-1,Text
Public Property Get City() As String
Attribute City.VB_Description = "Returns/sets the text contained in the control."
Attribute City.VB_MemberFlags = "14"
    City = txtCity.Text
End Property

Public Property Let City(ByVal New_City As String)
    txtCity.Text() = New_City
    PropertyChanged "City"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=txtState,txtState,-1,Text
Public Property Get State() As String
Attribute State.VB_Description = "Returns/sets the text contained in the control."
Attribute State.VB_MemberFlags = "14"
    State = txtState.Text
End Property

Public Property Let State(ByVal New_State As String)
    txtState.Text() = New_State
    PropertyChanged "State"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=txtZip,txtZip,-1,Text
Public Property Get Zip() As String
Attribute Zip.VB_Description = "Returns/sets the text contained in the control."
Attribute Zip.VB_MemberFlags = "14"
    Zip = txtZip.Text
End Property

Public Property Let Zip(ByVal New_Zip As String)
    txtZip.Text() = New_Zip
    PropertyChanged "Zip"
End Property

'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

    txtFirstName.Text = PropBag.ReadProperty("FirstName", "")
    txtLastName.Text = PropBag.ReadProperty("LastName", "")
    txtAddress.Text = PropBag.ReadProperty("Address", "")
    txtCity.Text = PropBag.ReadProperty("City", "")
    txtState.Text = PropBag.ReadProperty("State", "")
    txtZip.Text = PropBag.ReadProperty("Zip", "")
End Sub

'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

    Call PropBag.WriteProperty("FirstName", txtFirstName.Text, "")
    Call PropBag.WriteProperty("LastName", txtLastName.Text, "")
    Call PropBag.WriteProperty("Address", txtAddress.Text, "")
    Call PropBag.WriteProperty("City", txtCity.Text, "")
    Call PropBag.WriteProperty("State", txtState.Text, "")
    Call PropBag.WriteProperty("Zip", txtZip.Text, "")
End Sub

⌨️ 快捷键说明

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