15003.html

来自「VB技巧问答10000例,是一个教程」· HTML 代码 · 共 26 行

HTML
26
字号
<html>
  <head>
    <title>Common Dialog Control 传不回档名!</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>Common Dialog Control 传不回档名!</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by <a href="mailto:hopefond@ms8.hinet.net">sandy</a> on June 29, 1999 at 23:04:11:<p>
我使用Microsoft Common Dialog Control 且 flags 属性设定为:<br>cdlOFNExplorer Or cdlOFNAllowMultiselect Or cdlOFNLongNames<br>程式在跑时的确是可以选择多重档案,然而在选择完档案按确定后<br>结果档名并没有传回来值,看了微软的说明文件说,在window95 或 window Nt<br>下使用 cdlOFNExplorer Or cdlOFNAllowMultiselect Or cdlOFNLongNames<br>属性时,其传回来的档名是以"null"字元做间隔.......所以要另外写一个<br>副程式剖析档案....<br>但是我在选择完档案后传回来的"filename"属性只有目录而己呀!<br>以下是我的程式码..<br><pre><br>    cdo.CancelError = True<br>    cdo.Flags = cdlOFNExplorer Or cdlOFNAllowMultiselect Or cdlOFNLongNames<br>    On Error GoTo errtag<br>    cdo.ShowOpen<br>    '**此时我选择"c:\windows\file1.txt" ,"c:\windows\file2.txt"两个档案**<br>    On Error GoTo 0<br>    MsgBox "filetitle=" & cdo.FileTitle<br>    msgbox "filename=" & cdo.filename<br><font color=red>结果是filetitle="",filename="c:\windows\"</font><br></pre><br><p><br>以下是微软的说明文件:<p>cdlOFNExplorer 和 cdlOFNNoDereferenceLinks 旗标适用于 Windows 95 和 Windows NT 4.0。Windows 95 中 cdlOFNExplorer 的通用型对话方块使用 null 字元作为分隔符号;而在没有 Windows 95 shell 的 Windows NT 早期版本中,多重选择是使用空白作为分隔符号(故而无法支援长档名)。<p>请各位大德救救我吧!
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 15003-->
<!--top: 15005--><li><a href="15005.html">有传回哦..</a> <b>笋子</b> <i>01:19:35 6/30/99</i>
(<!--responses: 15005-->0)
<ul><!--insert: 15005-->
</ul><!--end: 15005-->
</ul><!--end: 15003-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?