Re: getting the .vbp filename in a vb project
Could be one line in VB6 as well. By default the vbp filename is the same as the exe filename other than the extension.
Code:
ProjectName=app.path &"\" & mid(app.exename,1,len(app.exename)-3) & "vpb"
The vbp however is typically not part of the files that would be installed on the end users system so this file would not be available at runtime in most cases. Not sure why one would need to do this type of thing.
One easy way of course would be to simply use dir$() and search app.path for *.vbp files most of the time there will be only one result. In cases where more than one project exist you could read a few lines from each to find the exe name for that project and match it to your app.exename
Last edited by DataMiser; June 25th, 2010 at 08:02 AM.
Always use [code][/code] tags when posting code.