Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Interface and Graphics

Post new topic   Reply to topic
Loading images - please help!
View previous topic :: View next topic  
Author Message
Mitesh2004
Freshman


Joined: 26 Jan 2004
Posts: 43

PostPosted: Feb 3rd, 2004 06:11 AM    Post subject: Loading images - please help! Reply with quote

Hello,

I am not sure if i am posting in the correct category, but i hope somebody can help me.

In my program, i want an image to be loaded into an ImageBox depending on what the user picks from a ComboBox. At the moment, i have specified the path where the images are located. However, when different users isntall the system onto their own computers, these image files will be located in a different place.

How do i not specify a definite path and retrieve the image from wherever the user has installed the system?

If you do not understand what i mean or need more details about my situation, just let me know.

I would be grateful for any help. Cheers!
Back to top
View user's profile Send private message Send e-mail
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Feb 3rd, 2004 07:08 AM    Post subject: Reply with quote

I don't fully understand but I think I have an idea... If the directory is completely random there isn't anything you can do... But if the images are in the same folder as the executable of your app or in a subfolder you can use :

Code:
App.Path


to find the path of the exe... Maybe after that yuo can specify the folder of the images as :

Code:
Dim ImagesPath As String
ImagesPath = App.Path & "\Images\"


?
_________________
No one is completely useless. They can at least be an example of what to avoid.
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Mitesh2004
Freshman


Joined: 26 Jan 2004
Posts: 43

PostPosted: Feb 3rd, 2004 07:34 AM    Post subject: Reply with quote

Thats GREAT!! Exactly what i needed! =D
Back to top
View user's profile Send private message Send e-mail
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Feb 3rd, 2004 03:46 PM    Post subject: Reply with quote

Smile
_________________
No one is completely useless. They can at least be an example of what to avoid.
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Jenny
Newbie


Joined: 06 Feb 2004
Posts: 6

PostPosted: Feb 6th, 2004 10:50 AM    Post subject: Easy!!! Reply with quote

Image1.Picture = LoadPicture(SelectedFile)


SelectedFile == Path

That's it ....

Gruss Jenny
Back to top
View user's profile Send private message Send e-mail
Avis
Junior Poster


Joined: 07 Oct 2003
Posts: 510
Location: India

PostPosted: Feb 6th, 2004 10:53 AM    Post subject: Reply with quote

Hi Jenny!

Code:
SelectedFile == Path


You don't have to use double equal signs..just a single will do the job.

Thanks!
_________________
Code Snippets, Tutorials, Utilities, Controls

Low cost Web Hosting
Hosting starts at as low as $4 per year!


Always follow posting guidelines
Put your VB code in [vb ] your code [ /vb] tags!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
Jenny
Newbie


Joined: 06 Feb 2004
Posts: 6

PostPosted: Feb 6th, 2004 10:58 AM    Post subject: haa!! Reply with quote

No I meant SelectedFile is a STRING witch contains the path...

OK??

Cheers Jenny
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Interface and Graphics All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic