Results 1 to 2 of 2

Thread: New User Question

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Location
    Cleveland Ohio
    Posts
    2

    Post

    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?

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width