Solved

Runtime persistent change of Label Captions

Posted on 2001-06-28
7
358 Views
Last Modified: 2010-04-06
I have a label on a form. What I want to do is edit the caption of the label. I know this can do it.

Label1.Caption := 'whatever';

Real problem is I want to change this caption in such a way that when the program restarts I want the label to have the changed caption. I want to do it without using files or registry to save the changed text.

Anybody got any ideas?
0
Comment
Question by:drnadeem
7 Comments
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6236872
It has got to be stored some where either in the registry or a file or a database. What did you have in mind?


The Crazy One
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6236938
Store it in the Drives volume label  :o)

Use SetVolumeLabel and GetVolumeInformation
0
 
LVL 4

Expert Comment

by:jsweby
ID: 6237094
CrazyOne is right, persistence comes from storing the changes somewhere, you can't write back the changes anywhere else so that they will be there next time, you'll have to have an ini file or registry key.

J.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:ITugay
ID: 6237271
Hi drnadeem,

Delphi help:
"resourcestring" - Resource strings are stored as resources and linked into the executable or library so that they can be modified without recompiling the program. For more information, see Internationalization and localization and the topics that follow it.
----

But you can't modify application's resource while application is running.

-----
Igor.
0
 
LVL 1

Expert Comment

by:OryxConLara
ID: 6657841
dmadeem--

I assume that when you say "without files" you mean that you want the app as one .EXE (nad perhaps some DLLs) without external data files.

If you're changing the texts because of language (Italian, English) you might try using the ITE introduced in Delphi-5. This allows you to manage sets of resource DLLs, containing strings and other stuff usually written to the .RES file.

0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8691034
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

To be PAQ/Refund

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 8816208
PAQ and no refund
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question