2个回答
2011-03-03
展开全部
Private Declare Function icePub_readFileToText Lib "icePubDll.dll" (ByVal strFilename As String, ByVal strText As String, ByVal maxLen As Integer) As Integer
Dim strFilename As String
Dim a2 As Integer
Dim strText As String
CommonDialog1.Filter = "*.txt|*.txt|All(*.*)|*.*"
CommonDialog1.Action = 1
If CommonDialog1.FileName <> "" Then
strFilename = CommonDialog1.FileName
strText = Space(1024 + 1)
a2 = icePub_readFileToText(strFilename, strText, 1024)
Text1.Text = strText
End If
下载新版:
http://icese.net/VC/icePubDll.rar
Dim strFilename As String
Dim a2 As Integer
Dim strText As String
CommonDialog1.Filter = "*.txt|*.txt|All(*.*)|*.*"
CommonDialog1.Action = 1
If CommonDialog1.FileName <> "" Then
strFilename = CommonDialog1.FileName
strText = Space(1024 + 1)
a2 = icePub_readFileToText(strFilename, strText, 1024)
Text1.Text = strText
End If
下载新版:
http://icese.net/VC/icePubDll.rar
更多追问追答
追问
显示 "*.txt|*.txt|All(*.*)|*.*"
为无效外部过程, 可以输出到list里吗?还有读取是在单击按钮事件以后发生
追答
CommonDialog1是一个标准控件,需要手动添加。把从Dim开始的所有语句放到按钮事件里即可
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询