Solved

Runtime persistent change of Label Captions

Posted on 2001-06-28
7
344 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now