|
-
May 2nd, 2002, 08:49 AM
#1
Thread Starter
Member
full path to picture
in a previous post i blamed my app didnt allways showing the pics; now i know why: its because sometimes it cant find the path to the pic;
i've the relative path in the database's pics field like this:
fotos6/30.bmp - this folder (fotos6) is in the same directory as my app's one
If i write the full path:
c:/my documents/fotos6/30.bmp
then it allways show the pics;
my question is: do i really have to write the full path, or is it just a local memory problem, or another bug?
One last thing: i cant see the pics when i press f5, but if a make an exe from my proj, i can see the pics, though having only the relative path...
Here's the code i'm using:
[i have a datagrid and in the DataGrid_RowColChange(bla bla)]
If Len(Adodc1.Recordset!foto) <> 0 Then
Picture1.Picture = LoadPicture(Adodc1.Recordset!foto)
Else
Picture1.Picture = LoadPicture("r.bmp") [that's the default pic]
End If
-
May 2nd, 2002, 09:00 AM
#2
Member
Re: full path to picture
Try something like:
Picture1.Picture = LoadPicture(app.path & "\" & Adodc1.Recordset!foto)
It's not working? Don't be discouraged. Try a bigger hammer!
-
May 2nd, 2002, 09:13 AM
#3
Bouncy Member
if you dont supply a directory (full path) then it will seach in the current working directory.
to make sure it searches in the right place, make a subfolder in your source code directory, and then use App.Path & "\YouSubFolder\file.pic"
-
May 2nd, 2002, 12:49 PM
#4
Thread Starter
Member
pic path
thanks !
klori's idea is very adequate because i've several folders to hold the pics
works great
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|