Results 1 to 3 of 3

Thread: Path

  1. #1

    Thread Starter
    Member susn's Avatar
    Join Date
    Feb 2001
    Location
    Dubai
    Posts
    48

    Question

    By using a .ini File to save some settings i need to ensure that the .ini File is created in the current App Path.

    At the moment the ini is located to C:\WINNT

    i do like following:

    SetINIEntry = WritePrivateProfileString(ByVal Eintrag, ByVal Section, ByVal Value, ByVal FileName)

    Is there a way to set the ini to App.Path?

    Thx,

    Susn

  2. #2
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123
    Try this:

    dim FileName as string

    FileName = App.Path & "\MyIni.ini"

    SetINIEntry = WritePrivateProfileString(ByVal Eintrag, ByVal Section, ByVal Value, ByVal FileName)

    -Dj4

  3. #3

    Thread Starter
    Member susn's Avatar
    Join Date
    Feb 2001
    Location
    Dubai
    Posts
    48

    Smile Path

    I got this Funktion ....

    Function Path$(ByVal drv$, ByVal subdir$)

    Do While Right$(drv$, 1) = "\"
    drv$ = Left$(drv$, Len(drv$) - 1)
    Loop

    Do While Left$(subdir$, 1) = "\"
    subdir$ = Mid$(subdir, 2)
    Loop

    Path$ = drv$ + "\" + subdir$

    End Function


    And i use it like this:

    SetINIEntry "Waferlayout", "Standort", glbStandort, Path$(App.Path, "wlayout.ini")


    Thank u for your Response DJ4.

    Greetings and Cheers,

    Susn

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