Hi guys! Im trying to find the real app.path where a project is run from inside the code of a usercontrol compiled as OCX.
Instead of what I expect I get:
IN IDE: The App.Path is OCX project folder.
COMPILED OCX: Where the OCX reside. (wich if its installed on the project using it its fine, but it can be installed on system32 or other folder)
In other words, I got a project in folder A and the ocx in folder B .... In project A I put the usercontrol and try to load and image using the name of the image concatenated with the app.path (filename = app.path & "\IMG\xxx.png") and whats happening is instead of A\IMG\xxx.png it try to load B\IMG\xxx.png.
So the question is: How to get the current executable/project path where the usercontrol inside the OCX is being used ?
Instead of what I expect I get:
IN IDE: The App.Path is OCX project folder.
COMPILED OCX: Where the OCX reside. (wich if its installed on the project using it its fine, but it can be installed on system32 or other folder)
In other words, I got a project in folder A and the ocx in folder B .... In project A I put the usercontrol and try to load and image using the name of the image concatenated with the app.path (filename = app.path & "\IMG\xxx.png") and whats happening is instead of A\IMG\xxx.png it try to load B\IMG\xxx.png.
So the question is: How to get the current executable/project path where the usercontrol inside the OCX is being used ?