📄 form2.frm
字号:
VERSION 5.00
Begin VB.Form Form2
Caption = "listbox的使用"
ClientHeight = 5460
ClientLeft = 60
ClientTop = 450
ClientWidth = 8550
LinkTopic = "Form2"
ScaleHeight = 5460
ScaleWidth = 8550
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "选择"
Height = 495
Left = 1440
TabIndex = 6
Top = 3240
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "返回"
Height = 495
Left = 1440
TabIndex = 5
Top = 4200
Width = 1215
End
Begin VB.TextBox Text2
Height = 975
Left = 4920
TabIndex = 4
Text = "Text2"
Top = 4200
Width = 3015
End
Begin VB.TextBox Text1
Height = 855
Left = 4920
TabIndex = 2
Text = "Text1"
Top = 3000
Width = 2895
End
Begin VB.ListBox List1
Height = 1230
ItemData = "Form2.frx":0000
Left = 1080
List = "Form2.frx":0002
TabIndex = 0
Top = 1320
Width = 2295
End
Begin VB.Label Label2
Caption = "Label2"
Height = 615
Left = 4920
TabIndex = 3
Top = 2280
Width = 2895
End
Begin VB.Label Label1
Caption = "who is your favorite star?Pleasechoose"
Height = 375
Left = 1080
TabIndex = 1
Top = 720
Width = 3135
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Label2.Caption = "your choose is"
Text1.Text = List1.Text
Text2.Text = List1.List(List1.ListIndex)
End Sub
Private Sub Command2_Click()
Form2.Hide
Form1.Show
End Sub
Private Sub Form_Load()
List1.AddItem "fiorello"
List1.AddItem "slina"
List1.AddItem "hebe"
List1.AddItem "jay"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -