![]() |
|
|
|
#1
|
|||
|
|||
|
OK, I lack Delphi programming knowledge, but I know that the error message I get is pretty stupid.
Here's my code, laugh if you will: Editor is a Memo component BG_img is a picture component Background path.txt is a text file containing the path fir BG_img's picture. Editor.lines.loadfromfile('c:\Lincs\config.txt\Bac kground path.txt'); BG_img.picture.loadfromfile(editor.lines.text); I get an error message saying that: Picture file extension is not valid (.BMP) If I use GetText (editor.lines.gettext), that doesn't work. It only works if I use commatext (editor.lines.commatext), but this is useless if I have a path with spaces, because it changes the spaces to: ", What can I do to get round this? Bear in mind I have a lack of in depth Delphi knowledge, Is there some simple code that would work? Please help!! Hornet |
|
#2
|
|||
|
|||
|
I think you have to Specify
what line the text is in, like this. Image1.Picture.LoadFromFile(Memo1.Lines.Strings[0]); If the text in the memo(the text file) is right, the image should load. aWiL (awil00@hotmail.com) |
![]() |
| Thread Tools | |
| Display Modes | |
|
|