查找已建立的模块路径 [英] Finding Built Module Path

查看:63
本文介绍了查找已建立的模块路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我仍然在编写我的编程语言,即使我已经编写了另外4种语言,该语言也会更高级,我想知道...我如何找到该模块的地址?我在视觉基本模块中制作我的编程语言,并且试图找到一个名为properties.txt的文件,但我无法获取它.我已经尝试过"properties.txt",但我听不懂.我目前所拥有的代码是:

hey guys,

i am still making my programming language, even though i have made 4 others, this one will be more advanced, and i was wondering...how do i find the address of the module? i am making my programming language in a visual basic module and i am trying to find a file called properties.txt but i cant get it. i have tried just "properties.txt" but i cant get it. i code i have at the moment is:

Dim PropertiesPath as String
PropertiesPath = "properties.txt"



我知道这不是使用Visual Basic模块使用文本文件的初衷.我正在寻找一种方法来找到内置模块的路径,然后在该文件夹中归档文件以使其正常工作.能否请你帮忙?



i know that this isn''t what it was meant to be and im new to using text files with visual basic modules. I am looking for a way to do find the path of the built module and then file a file within that folder for this to work. could you please help? thanks in advanced.

推荐答案

从您的问题中可以看出,您似乎想在文件properties.txt中找到path .
为此,如果将此文件放在程序可执行文件所在的文件夹中,则Application.StartupPath property可用于获取文件的文件夹,如下所示
As seen from your question it appears that you want to find the path to the file properties.txt.
For this purpose if you put the this file in the folder where the executable file of the program is there, then Application.StartupPath property can be used to get the folder of the file as shown below
Dim PropertiesPath as String
PropertiesPath = Application.StartupPath & "\" & "properties.txt"


这篇关于查找已建立的模块路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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