当前位置:首页 > 编程 > VB 编程 > 正文内容

VB 按行读取文本内容

Cristian_Ng1年前 (2024-11-14)VB 编程
Dim NFile as string 
list1.clear
NFile = app.path & "\1.txt"
Open NFile For Input As #1
Do While Not EOF(1)
Line Input #1, temp
	If temp <> "" Then
		list1.add temp
	End If
Loop
Close #1


“VB 按行读取文本内容” 的相关文章

菜单图标范例

Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As LongPrivate Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal...

VB 复制文件或文件夹到系统剪贴板

VB 复制文件或文件夹到系统剪贴板'-----------------------------------------------------------模块内容Option ExplicitPrivate Type POINTAPI    x As Long    y As LongEnd Typ...

vb 小时分钟秒换算秒 互换

Private Function ZToFSAll(ByVal ZT As Long) As String'全存样式'从天,时,分,秒整合为秒Dim T, S, F, M As Integer '天,时,分,秒Dim T1, S1 As Integer '天,时,分,秒Dim M1 As Strin...

VB 计算两个时间差

Private Sub Command1_Click()Text2.Text = Now()End SubPrivate Sub Command2_Click()MsgBox DateDiff("s", Text1.Text, Text2.Text)End SubPrivate Sub Form_L...

文件关联

如何在 VB6.0中 创建自己的文件类型    在Windows中,当我们双击一个.txt文件的时候,“记事本”程序会自动打开,并且显示.txt文件的内容;当我们将一个.txt文件拖到“记事本”的图标上的时候,“记事本”程序也会自动打开,并且显示.txt文件的内容。在Windows中,这种技术称为“...

VB 版本检查升级模块

'模块 '模块名称UpdateModule Function UpdateCheck() '升级检查 Dim NUrl As String Dim NFile As String Dim ExeLen As String Dim ServerUrl as string ServerUr...