Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2001, 10:56 AM
hornet hornet is offline
Member
 
Join Date: Aug 2000
Posts: 36
Default .BMP isn't a valid picture file format!? Uhum!?

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
Reply With Quote
  #2  
Old 01-05-2001, 01:59 PM
awil00 awil00 is offline
Junior Member
 
Join Date: Jan 2001
Posts: 18
Default RE: .BMP isn't a valid picture file format!? Uhum!?

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)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 01:16 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.