【VB开源代码栏目提醒】:本文主要为网学会员提供Ex2_6.frm,希望对需要Ex2_6.frm网友有所帮助,学习一下!
VERSION 5.00
Begin VB.Form Ex2_6
Caption = "Form1"
ClientHeight = 3075
ClientLeft = 60
ClientTop = 450
ClientWidth = 4560
LinkTopic = "Form1"
ScaleHeight = 3075
ScaleWidth = 4560
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text4
Height = 375
Left = 2160
TabIndex = 6
Top = 2160
Width = 1455
End
Begin VB.TextBox Text3
Height = 375
Left = 2160
TabIndex = 5
Top = 1560
Width = 1455
End
Begin VB.CommandButton Command2
Caption = "用""&&""连接"
Height = 375
Left = 960
TabIndex = 4
Top = 2160
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "用""+""连接"
Height = 375
Left = 960
TabIndex = 3
Top = 1560
Width = 1095
End
Begin VB.TextBox Text2
Height = 375
Left = 2160
TabIndex = 2
Top = 960
Width = 1455
End
Begin
VB.TextBox Text1
Height = 375
Left = 960
TabIndex = 1
Top = 960
Width = 1095
End
Begin VB.Label Label1
Caption = "输入两个字符串:"
Height = 255
Left = 480
TabIndex = 0
Top = 240
Width = 1575
End
End
Attribute VB_Name = "Ex2_6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Dim str1 As Integer, str2 As String
Dim str1 As String, str2 As String
Private Sub Command1_Click()
str1 = Text1.Text
str2 = Text2.Text
Text3.Text = str1 + str2
End Sub
Private Sub Command2_Click()
Text4.Text = str1 & str2
End Sub