📄 addressctl.ctl
字号:
VERSION 5.00
Begin VB.UserControl AddressCtl
ClientHeight = 5805
ClientLeft = 0
ClientTop = 0
ClientWidth = 7230
ScaleHeight = 5805
ScaleWidth = 7230
Begin VB.TextBox txtZip
Height = 735
Left = 3960
TabIndex = 4
Top = 4920
Width = 3015
End
Begin VB.TextBox txtState
Height = 735
Left = 240
TabIndex = 3
Top = 4920
Width = 2415
End
Begin VB.TextBox txtCity
Height = 855
Left = 240
TabIndex = 2
Top = 3360
Width = 5055
End
Begin VB.TextBox txtStreet
Height = 735
Left = 240
TabIndex = 1
Top = 1920
Width = 5055
End
Begin VB.TextBox txtName
Height = 735
Left = 240
TabIndex = 0
Top = 480
Width = 5055
End
Begin VB.Label lblZip
Caption = "Zip"
Height = 255
Left = 3960
TabIndex = 9
Top = 4440
Width = 3015
End
Begin VB.Label lblState
Caption = "State"
Height = 255
Left = 240
TabIndex = 8
Top = 4440
Width = 1935
End
Begin VB.Label lblCity
Caption = "City"
Height = 255
Left = 240
TabIndex = 7
Top = 2880
Width = 2895
End
Begin VB.Label lblStreet
Caption = "Street"
Height = 375
Left = 240
TabIndex = 6
Top = 1320
Width = 2895
End
Begin VB.Label lblName
Caption = "Name"
Height = 255
Left = 360
TabIndex = 5
Top = 120
Width = 2655
End
End
Attribute VB_Name = "AddressCtl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Private Sub Command1_Click()
'MsgBox AddressCtl.AddressText
End Sub
Private Sub UserControl_Resize()
With UserControl
If .Height < 3615 Then .Height = 3615
If .Width < 2175 Then .Width = 2175
txtName.Width = .ScaleWidth - 500
txtStreet.Width = .ScaleWidth - 500
txtCity.Width = .ScaleWidth - 500
txtState.Width = .ScaleWidth / 2 - 160
txtZip.Width = .ScaleWidth / 2 - 160
txtZip.Left = .ScaleWidth / 2 + 160
End With
End Sub
Public Property Get AddressText() As String
Dim s As String
s = txtName & vbCrLf
s = s & txtStreet & vbCrLf
s = s & txtCity & vbCrLf
s = s & txtState & vbCrLf
s = s & txtZip
AddressText = s
End Property
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -