Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Inifile ReadString in XE4

Inifile ReadString in XE4

Inifile ReadString in XE4


I am moving a project from Delphi 7 to XE4 and compilation appeared fine. I have XE4 installed on Windows 7 and building as a Win32 application, the program appears to work fine on that machine and no issues (I have Delphi 7 on a Vista machine.)

When I copy the program to Vista I get problems. The startup of the program is supposed to read an ini file, gets the filepath of a logo and displays on screen, this simply does not work and no custom logo is displayed. This works fine on XE4/Win7 but on Vista no luck. When I changed to XE4 I did change all AnsiString to String in the code, but since the issue is at the start of execution not much is stored into variables I declared so not sure if that would cause issue.

This is my basic code which compiles without issue in both XE4 and D7 but will not display in Vista if built in Win7/XE4:

CODE --> delphi

Gbl_logo : string;

Gbl_logo := inifile.readstring(‘Settings’,’Logo’,’’);
If trim(Gbl_logo) <> ‘’ then
  If FileExists(Gbl_logo) then

Example paths of my logo are d:\custom.jpg and c:\programming picture\test.jpg.

Thank you in advance to any suggestions.

RE: Inifile ReadString in XE4

Just to add when I do showmessage the dialog box in Win7 shows for example:

c:\projects\software example logo code\logo.jpg

When run in Vista I get:

c:\projects\software example logo

It looks like a line break appears from nowhere, I checked the ini file and no line breaks...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close