PDA

Click to See Complete Forum and Search --> : New User Question


BC
Mar 10th, 2000, 11:46 PM
I created a simple program with the code I learned in class.
It works fine except when I compile it as a .exe it still points to the path on the local drive. How do I get the compile to include the pictures?

Sam Finch
Mar 11th, 2000, 01:19 AM
If you use VB's CurDir function it will return the directory the exe is stored in

try making a simple program with just a form and a label and put this code in the form load event


Option Explicit

Private Sub Form_Load()
Label1.Caption=CurDir
End Sub


then compile this and try moving the .exe around your hard drive it should always show the Right Directory even with shortcuts etc

Then just put your pictures in the same Directory as the .exe File and save the CurDir as a string in the form load event of your main form, use this string to find your pictures