Can anyone Field a Visual Basic Question?

This is a discussion on Can anyone Field a Visual Basic Question? within the Windows Programming forums, part of the Platform Specific Boards category; I haven't found a board like this for VB , and to this point I have not needed one. Heres ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    411

    Can anyone Field a Visual Basic Question?

    I haven't found a board like this for VB, and to this point I have not needed one.

    Heres my problem.

    I am writing files in VB, everytime I write a file it gets created in C:/Windows. I need to specify the path with the filename, the application cannot rely on a static path so I need to find a way to get the path to the .exe that is my VB program.

    I can imagine that there is some kind of global identifier, I just dont know it.

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Code:
        Dim gPath As String
        gPath = App.Path
        If (Right(gPath, 1) <> "\") Then
            gPath = gPath & "\"
        End If
    And here is a good VB forum.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    411
    Thanks bud.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. odd errors from msvc std library files
    By blight2c in forum C++ Programming
    Replies: 6
    Last Post: 04-30-2002, 12:06 AM
  4. Replies: 1
    Last Post: 04-20-2002, 06:49 AM
  5. Moving from Visual Basic to Visual C++
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 04-10-2002, 09:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21