?? test.frm
字號(hào):
VERSION 5.00
Begin VB.Form test
Caption = "Form1"
ClientHeight = 7815
ClientLeft = 60
ClientTop = 345
ClientWidth = 9510
LinkTopic = "Form1"
ScaleHeight = 7815
ScaleWidth = 9510
StartUpPosition = 3 'Windows Default
Begin VB.ListBox List2
Height = 2595
Left = 3855
TabIndex = 6
Top = 1980
Width = 2310
End
Begin VB.CommandButton Command4
Caption = "Command4"
Height = 540
Left = 2220
TabIndex = 5
Top = 2610
Width = 1335
End
Begin VB.ListBox List1
Height = 2595
Left = 180
TabIndex = 4
Top = 1920
Width = 1680
End
Begin VB.CommandButton Command3
Caption = "Command3"
Height = 540
Left = 3690
TabIndex = 3
Top = 1200
Width = 3390
End
Begin VB.CommandButton Command2
Caption = "Command2"
Height = 480
Left = 645
TabIndex = 2
Top = 1260
Width = 2430
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 525
Left = 5655
TabIndex = 1
Top = 390
Width = 2700
End
Begin VB.TextBox Text1
Alignment = 2 'Center
Height = 900
Left = 1590
MultiLine = -1 'True
TabIndex = 0
Top = 90
Width = 3750
End
End
Attribute VB_Name = "test"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command4_Click()
Dim i As Integer
Dim str() As String
ReDim Preserve str(0) As String
str(0) = "string 0"
ReDim Preserve str(1) As String
str(1) = "string 1"
ReDim Preserve str(2) As String
str(2) = "string 2"
ReDim Preserve str(3) As String
str(3) = "string 3"
ReDim Preserve str(4) As String
str(4) = "string 4"
For i = 0 To 4
Me.List1.AddItem str(i)
Next i
ReDim Preserve str(3) As String
' str(3) = "asdf"
For i = LBound(str) To UBound(str)
Me.List2.AddItem str(i)
Next i
End Sub
Private Sub Command1_Click()
Dim fpath As String, fnum As Integer, str As String
fpath = App.Path & "\tmp.txt"
fnum = FreeFile
Open fpath For Output As fnum
str = "sadf" & vbCrLf & "new line" & vbCrLf & "asdf" & Text1.Text & vbCrLf & "finish it"
Write #fnum, str
Close #fnum
fnum = FreeFile
Open fpath For Input As fnum
Input #fnum, str
Close #fnum
DoEvents
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -