Solved

Runtime persistent change of Label Captions

Posted on 2001-06-28
7
349 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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 this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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