编程VB 在text1中输入文件名,点击按钮,在某盘某文件夹下找到该文件,并将文件内容显示在text2中
4个回答
2011-12-12
展开全部
Private Declare Function icePub_searchFiles Lib "icePubDll.dll" (ByVal strCurrentPath As String,ByVal strFileName As String,ByVal strResult As String,ByVal resultMaxLen As Integer) As Integer
Private Declare Function icePub_readFileToText Lib "icePubDll.dll" (ByVal strFilename As String,ByVal strText As String,ByVal maxLen As Integer) As Integer
Dim a2 As Integer
Dim str1 As String
Dim strText As String
str1 = Space(1024 * 10 + 1)
a2 = icePub_searchFiles("C:\",Text1.Text,str1,1024*10)
MsgBox str1
strText=Space(1024*10+1)
a2 = icePub_readFileToText(str1,strText,1024*10)
'MsgBox strText
Text2.Text=strText
Private Declare Function icePub_readFileToText Lib "icePubDll.dll" (ByVal strFilename As String,ByVal strText As String,ByVal maxLen As Integer) As Integer
Dim a2 As Integer
Dim str1 As String
Dim strText As String
str1 = Space(1024 * 10 + 1)
a2 = icePub_searchFiles("C:\",Text1.Text,str1,1024*10)
MsgBox str1
strText=Space(1024*10+1)
a2 = icePub_readFileToText(str1,strText,1024*10)
'MsgBox strText
Text2.Text=strText
参考资料: icePubDll百度之
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
那这文件 得是能显示的呀
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询