Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15050

Project App.path from inside UC in OCX? [Solved]

$
0
0
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 ?

Viewing all articles
Browse latest Browse all 15050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>