Results 1 to 5 of 5

Thread: Image Files

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2008
    Posts
    1

    Image Files

    I know VB6 but my main programming language is html so I am having a little bit of conflict between the languages and my understanding. In web design if I want to reference an image all I have to do is ensure that the "images" folder is inside the main folder and then I can shorten the path. An example is, if I am trying to show an image called earth.jpeg and it is in the images folder, all I would have to show for the file path as "images\earth.jpeg" and it would know that it must be the "images" folder inside the main folder and the "earth.jpeg" inside the "images' folder. Is there a way to do this in VB6, so that if a folder gets moved it is not looking for the entire path, "C:\Program Files\...."

  2. #2
    Fanatic Member
    Join Date
    Feb 2001
    Posts
    759

    Re: Image Files

    If you store your images folder inside of the Application's folder then you could use

    Code:
    App.Path & "\images\earth.jpeg
    Then if the Application Folder was moved the earth file could still be found. Hopefully that helps.

  3. #3
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: Image Files

    Or you could put in a resource file and not need it in a folder
    http://support.microsoft.com/kb/q194409/

    Call it like this:
    Set picture1.Picture = LoadPictureResource(101, "Custom")
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  4. #4
    New Member
    Join Date
    Oct 2008
    Posts
    2

    Wants to Store images into SQL Server Desktop Edition

    Dear i have made a project in Vb 6 using SQl Server (desktop edition).
    I want to store images into the database and retrieve it as well.

    Please help me regarding this.


    Kay5ive

  5. #5
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: Wants to Store images into SQL Server Desktop Edition

    Quote Originally Posted by kay5ive
    Dear i have made a project in Vb 6 using SQl Server (desktop edition).
    I want to store images into the database and retrieve it as well.

    Please help me regarding this.
    So start your own thread, don't piggyback on other people's
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

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