variable file locations how to deal with ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sparky AKA_Sparkticus

    #1

    variable file locations how to deal with ?



    I have a project with several animations in.
    is their a way to set the file location other then retype the location on
    the project every time i move the folder

    Private Sub Timer1_Timer()
    On Error GoTo errhand
    Static i As Integer
    ' this is the line giving me trouble
    Image3.Picture = LoadPicture("C: \My Documents\math Project v1\Images\image "
    & i + 1 & ".gif")

    i = i + 1
    If i > 4 Then i = 0
    Exit Sub
    errhand:
    MsgBox Err.Number & " " & Err.Description , vbDefaultButton 1, "Error Message"
    End Sub

    Sparky


  • jamie

    #2
    Re: variable file locations how to deal with ?

    Sparky AKA_Sparkticus wrote:[color=blue]
    > I have a project with several animations in.
    > is their a way to set the file location other then retype the location on
    > the project every time i move the folder
    >
    > Private Sub Timer1_Timer()
    > On Error GoTo errhand
    > Static i As Integer
    > ' this is the line giving me trouble
    > Image3.Picture = LoadPicture("C: \My Documents\math Project v1\Images\image "
    > & i + 1 & ".gif")
    >
    > i = i + 1
    > If i > 4 Then i = 0
    > Exit Sub
    > errhand:
    > MsgBox Err.Number & " " & Err.Description , vbDefaultButton 1, "Error Message"
    > End Sub
    >
    > Sparky
    >
    >[/color]

    Hi Sparky,

    You could place the animations in the same folder as the application
    then you could use:

    Image3.Picture = LoadPicture(App .Path + "\\GifName.gif" )

    Jamie

    Comment

    • Sparky AKA_Sparkticus

      #3
      Re: variable file locations how to deal with ?



      [color=blue]
      > Hi Sparky,
      >
      > You could place the animations in the same folder as the application
      > then you could use:
      >
      > Image3.Picture = LoadPicture(App .Path + "\\GifName.gif" )
      >
      > Jamie[/color]

      thanx i'll give that a try

      sparky
      --

      It is the mark of an educated mind to be able to entertain a thought
      without accepting it. Aristotle


      Comment

      Working...