如何单击按钮然后导航到文件夹的目录 [英] How to click on a button then navigate to the folder's dirrectory
本文介绍了如何单击按钮然后导航到文件夹的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在做我自己的文件对话框
程序现在可以检索我电脑中的驱动器列表
如何导航到驱动器中的文件夹我选择了吗?
我尝试过:
i am doing my own file dialog
the program now able to retrieve the list of the drives in my computer
how to navigate to the folder in the drive i have selected?
What I have tried:
dim driveList as driveinfo = directcast(selectedbutton.text, driveinfo)
这行中的
我收到错误,
string无法转换成driveinfo,
在这种情况下,我无法使用DirectoryInfo获取该驱动器中的文件夹
需要一些建议
谢谢
in this line i get an error,
string can not be converted into driveinfo,
in this case i can't use DirectoryInfo to get the folder in that drive
need some advice
thank you
推荐答案
错误信息非常清楚,你不能把字符串转换为driveinfo类型,它们之间没有继承。请参阅 DirectCast Operator(Visual Basic) [ ^ ]。
The error message is perfectly clear, you cannot cast a string to a driveinfo type, there is no inheritance between them. See DirectCast Operator (Visual Basic)[^].
这篇关于如何单击按钮然后导航到文件夹的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文