使用Common Dialog选择目录 [英] Selecting a directory with the Common Dialog

查看:73
本文介绍了使用Common Dialog选择目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用Common Dialog来选择像许多程序一样的目录,但我没有管理它。你总是要选择一个文件,但我不想看/选择文件,只有目录!

这个问题的早期帖子没有(正确)回答。

我搜索了MSDN图书馆,互联网和这个论坛,但没有找到答案...

请...

I tried to use the Common Dialog for choosing directories like many programs do but I did not manage it. You always have to select a file but I don''t want to see/select files, only directories!
Earlier posts on this issue were not (proper) answered.
I searched the MSDN Library, Internet and this forum but found no answers...
Please...

推荐答案

什么版本的你在用vb吗?


有一个:

" FolderBrowserDialog"

in vb 2005


这将解决你的问题
What version of vb are you using?

There is a:
"FolderBrowserDialog"
in vb 2005

which would solve you problem


你仍然可以使用VB 6.0



尝试删除文件名部分,你将获得目录。
You can still use the VB 6.0

Try to find the location of the file using the CD control.

Try to remove file name part and you will get the directory.



我试图使用Common Dialog选择像许多程序那样的目录,但我没有管理它。你总是要选择一个文件,但我不想看/选择文件,只有目录!

这个问题的早期帖子没有(正确)回答。

我搜索了MSDN图书馆,互联网和这个论坛,但没有找到答案...

请...
I tried to use the Common Dialog for choosing directories like many programs do but I did not manage it. You always have to select a file but I don''t want to see/select files, only directories!
Earlier posts on this issue were not (proper) answered.
I searched the MSDN Library, Internet and this forum but found no answers...
Please...



感谢您的回复。

从路径中删除文件没问题,但我不想导航文件debasisdas。

那个FolderBrowserDialog听起来很有趣jamesd0142!我不知道。它是自定义控件吗?它在VB6中是否仍然存在? MSDN Library不知道它。

如何调用它?我正在使用VB6 6.0.8169。

grts

Both thanks for reply.
Stripping the file from the path is no problem but I don''t want to navigate files debasisdas.
That "FolderBrowserDialog" sounds interesting jamesd0142! I don''t know it. Is it a custom control? Does it still exist in VB6? MSDN Library does not know it.
How can I invoke it? I''m using VB6 6.0.8169.
grts


这篇关于使用Common Dialog选择目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆