| View previous topic :: View next topic |
| Author |
Message |
Mitesh2004 Freshman
Joined: 26 Jan 2004 Posts: 43
|
Posted: Feb 3rd, 2004 06:11 AM Post subject: Loading images - please help! |
|
|
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 |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Feb 3rd, 2004 07:08 AM Post subject: |
|
|
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 :
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 |
|
Mitesh2004 Freshman
Joined: 26 Jan 2004 Posts: 43
|
Posted: Feb 3rd, 2004 07:34 AM Post subject: |
|
|
| Thats GREAT!! Exactly what i needed! =D |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Feb 3rd, 2004 03:46 PM Post subject: |
|
|
 _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
Jenny Newbie
Joined: 06 Feb 2004 Posts: 6
|
Posted: Feb 6th, 2004 10:50 AM Post subject: Easy!!! |
|
|
Image1.Picture = LoadPicture(SelectedFile)
SelectedFile == Path
That's it ....
Gruss Jenny |
|
| Back to top |
|
Avis Junior Poster

Joined: 07 Oct 2003 Posts: 510 Location: India
|
|
| Back to top |
|
Jenny Newbie
Joined: 06 Feb 2004 Posts: 6
|
Posted: Feb 6th, 2004 10:58 AM Post subject: haa!! |
|
|
No I meant SelectedFile is a STRING witch contains the path...
OK??
Cheers Jenny |
|
| Back to top |
|
|