这似乎并不是一个“开箱即用”的解决方案.
取自The Old Joel On Software Forums
Anyways.. to put this topic to rest..
the following was my VB6 solution: I
define 2 symbols in my VB project
“MPDEBUG” and “MPRELEASE” and call the
following function as the first
operation in my apps entry point
function.
Public Sub ChangeDirToApp() #If MPDEBUG = 0 And MPRELEASE = 1 Then ' assume that in final release builds the current dir will be the location ' of where the .exe was installed; paths are relative to the install dir ChDrive App.path ChDir App.path #Else ' in all debug/IDE related builds,we need to switch to the "bin" dir ChDrive App.path ChDir App.path & BackSlash(App.path) & "..\bin" #End If End Sub