【VB开源代码栏目提醒】:网学会员,鉴于大家对VB开源代码十分关注,论文会员在此为大家搜集整理了“Ex4_2.frm”一文,供大家参考学习!
VERSION 5.00
Begin VB.Form Ex4_2
Caption = "Form1"
ClientHeight = 3915
ClientLeft = 60
ClientTop = 450
ClientWidth = 4410
LinkTopic = "Form1"
ScaleHeight = 3915
ScaleWidth = 4410
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height = 495
Left = 240
MultiLine = -1 'True
TabIndex = 5
Top = 3120
Width = 3855
End
Begin VB.CommandButton Command3
Caption = "连接数组A和数组B"
Height = 375
Left = 240
TabIndex = 4
Top = 2640
Width = 1695
End
Begin VB.CommandButton Command2
Caption = "为数组B输入数据"
Height = 375
Left = 2160
TabIndex = 3
Top = 1200
Width = 1935
End
Begin VB.CommandButton Command1
Caption = "为数组A输入数据"
Height = 375
Left = 240
TabIndex = 1
Top = 1200
Width = 1695
End
Begin VB.TextBox Text1
Height = 495
Left = 240
MultiLine = -1 'True
TabIndex = 0
Top = 600
Width = 3975
End
Begin VB.Label Label1
Caption = "要输入到数组B中的内容:"
Height = 255
Left = 360
TabIndex = 2
Top = 240
Width = 2535
End
End
Attribute VB_Name = "Ex4_2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim A(3) As String
Dim B() As String '定义字符串数组
Private Sub Command1_Click()
For i = 0 To 3
A(i) = InputBox("输入A(" & i & ")的值")
Next i
End Sub
Private Sub Command2_Click()
B() = Split(Text1.Text, ",") '为数组B赋值
End Sub
Private Sub Command3_Click()
Dim strA, strB As String
strA = Join(A, "")
strB = Join(B, "")
Text2.Text = strA & strB
End Sub
上一篇:
Ex4_1.frm
下一篇:
投简历到国外的公司需考虑哪些东西?