很急的~我就使用该属性读取了几百个文件名,结果反应出来只有十来个文件名,我设置的MaxFileName大概有10240,有什么办法可以解决吗?换控件也行,或请教其他高效方法~
解决方案 »
- 不太懂vb,帮忙看下成语接龙的程序,或一起讨论以下成语接龙的算法(100分)
- Excel VBA 发邮件(A program is trying to automatically send e-mail on your behalf)
- vb脚本向本机和局域网中的另一电脑分别记录数据,存在问题
- 帮忙,在线等!如何把*.txt中的内容在文本框中按行显示!
- 请问哪里有月份,天数统计的图示!就是那种长条的图示!
- 如何基于原有的字体产生新的字体
- oracle问题
- >>>>>>>>>>OICQ上输入_朝鲜语<<<<<<<<<<<<<<<
- 一个dll文件,怎么能看到它的所有函数和资源呢?(不是active dll哟)
- adodb.command.activeconnection报错
- 动态库调用 有问题啊 帮忙看看 咋会事?????
- 关于窗口,控件宽度的问题
Option Explicit Private Sub Command1_Click()
Dim current As Integer
Dim I As Integer
Dim intIndex As Integer
Dim iStart As Integer
Dim FileNames$()
Dim sFname As String
Dim iEndPath As Integer Text2.Text = ""
With CommonDialog1
.MaxFileSize = 2048 ' Set as appropriate
.filename = ""
.Filter = "All Files|*.*"
.Flags = cdlOFNAllowMultiselect + cdlOFNExplorer
.ShowOpen
sFname = .filename & vbNullChar
End With iEndPath = 1
' determine if multiple files were selected
' null delimiter is not inserted if only 1 file is selected
If countDelimiters(sFname, vbNullChar) = 1 Then
Do Until (iEndPath = 0)
iStart = iEndPath + 1
iEndPath = InStr(iEndPath + 1, sFname, "\")
Loop
ReDim Preserve FileNames(0)
' determine if root directory was selected - preserve the "\"
If countDelimiters(sFname, "\") = 1 Then
FileNames(0) = Mid(sFname, 1, iStart - 1)
Else
FileNames(0) = Mid(sFname, 1, iStart - 2)
End If
Else
iStart = InStr(1, sFname, vbNullChar) + 1
ReDim Preserve FileNames(0)
FileNames(0) = Left(sFname, iStart - 2)
End If intIndex = 1
For I = iStart To Len(sFname)
If Mid(sFname, I, 1) = vbNullChar Then
ReDim Preserve FileNames(intIndex)
FileNames(intIndex) = Mid(sFname, iStart, I - iStart)
iStart = I + 1
intIndex = intIndex + 1
End If
Next I ' display information in proper text box
For I = 0 To UBound(FileNames)
If I Then
Text2.Text = Text2.Text & FileNames(I) & vbCrLf
Else
Text1.Text = FileNames(I)
End If
Next I End Sub Function countDelimiters(ByVal sFiles As String, _
ByVal vSearchChar As Variant) As Integer Dim iCtr As Integer
Dim iResult As Integer For iCtr = 1 To Len(sFiles)
If Mid(sFiles, iCtr, 1) = vSearchChar Then iResult = iResult + 1
Next iCtr countDelimiters = iResult End Function
'*** End Code ***
我在窗体上放了一个WebBrowser控件,就可以浏览网站了,但是网站有一些弹出的窗体,却使用了系统默认的浏览器,既使用的IE作为弹出窗体的浏览器了。