怎么写相对路径?

acmo 2003-12-01 10:24:23
System.Reflection.Assembly.GetExecutingAssembly.Location是全部路径,可我只想取项目所在的目录
...全文
76 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
orcale 2003-12-01
  • 打赏
  • 举报
回复
Application.Path
zs1005 2003-12-01
  • 打赏
  • 举报
回复
Directory.GetCurrentDirectory运行时相当于VB中的APP.Path,你是想要这个么?
weixinzhu 2003-12-01
  • 打赏
  • 举报
回复
curdir()就是你要的路径
acmo 2003-12-01
  • 打赏
  • 举报
回复
Directory.GetCurrentDirectory在调试时读取到bin目录下了
zs1005 2003-12-01
  • 打赏
  • 举报
回复
Directory.GetCurrentDirectory

如读取当前目录的配置文件:
Dim SettingFile As String = Directory.GetCurrentDirectory & "\config.INI"
...
ashflying 2003-12-01
  • 打赏
  • 举报
回复
找到最末一個"\"不就可以了麼!!!!!!!
ashflying 2003-12-01
  • 打赏
  • 举报
回复
找到最末一個"/"不就可以了麼!!!!!!!

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧