Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

adding "Tip for the day" or "Thought for the day" to your application

Posted on 2007-11-21
12
Medium Priority
?
245 Views
Last Modified: 2010-04-04
I can't seem to come up with too much on google, and there's absolutely nothing on EE, so it's time to add this one to the index of knowledge...

I want to have a "tip for the day" every time the application loads.
Typically the form has a scroller so you can see "tomorrow's" tip or "yesterdays tip" too.
There's usually a checkbox that says "Always show tips when the application starts".

I suppose the hints themselves would be stored in a txt file.

Can any expert mash together some kind of randomise function to fetch a random tip and place it in a memo, or even better, point me to an existing example or component for this.

Thanks!
0
Comment
Question by:rfwoolf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +2
12 Comments
 
LVL 19

Assisted Solution

by:MerijnB
MerijnB earned 400 total points
ID: 20328995
check here, lots of them: http://www.torry.net/pages.php?id=495
0
 
LVL 18

Assisted Solution

by:Johnjces
Johnjces earned 300 total points
ID: 20329326
0
 
LVL 4

Assisted Solution

by:BedouinDN
BedouinDN earned 300 total points
ID: 20331918
The Jedi VCL also has a Tip of the Day component.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 13

Author Comment

by:rfwoolf
ID: 20332698
Hmm... thanks...
but it seems they all like to use dialogs! I want the tip of the day to appear in my login form.
I've opened up JvTipOfDay.pas but it doesn't seem to have an associated dfm - i.e. its form may be created at runtime.
I might have to create this myself :(
0
 
LVL 19

Expert Comment

by:MerijnB
ID: 20333131
ok, what part are you looking for then? You say that you want to make it in your login form yourself.
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 20333148
Hmmm... it should be quite easy to do. I would have a text file with all the tips.
Then I would have an INI file which lists the last line number (tip number) that was loaded.
The application would check the line number, incremement it by 1, then load the number into the editbox.

I suppose it would be nice if it **looked** like the Jedi VCL component does, you know, that "typical" tip for the day look.

Should be easy enough :)
If I have any trouble I will post a new question asking help for that so we don't contaminate the points for this question
0
 
LVL 19

Expert Comment

by:MerijnB
ID: 20333184
so... what is it you need for this question then?
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 20333189
MerjinB I am keeping this question open a bit longer to see if there are any other answers.
0
 
LVL 19

Expert Comment

by:MerijnB
ID: 20333194
ok, got it
0
 
LVL 13

Author Comment

by:rfwoolf
ID: 20335778
I ended up using a stringlist's LoadFromFile, and then saying MyStringList.string[4] if I want the 4th tip, etc.
To record the number of the latest tip, i store in an INI file (although technically it can be stored in the txt file)

I will close this question soon.
Thanks for all the answers
0
 
LVL 2

Accepted Solution

by:
bogdan_iuly earned 600 total points
ID: 20337508
Hello,

I see you have found a method to do it, but I thought this ideea might help you more.

You can use the following method to display the tip of the day:

The StringList is a little buggy, because if you have a tip on two lines, it will separate it and it will show it as two different tips.
Store the tips in Tips.ini, for example, in a structure like the one below:

[General]
LastID=1
NrTips=3

[Tips]
Tip1=tip1
Tip2=tip2
Tip3=tip3

1. Check if ini exists and if so, execute steps 2-5, otherwise show a message, hide the panel that displays the tip, etc ... This depends on your implementation.
2. Read from the ini the ID of the last shown tip (=LastID) and the number of tips (=NrTips); both with a default value of 0
3. Increment LastID
4. If LastID is bigger than NrTips, then make the LastID equal to the ID of the first tip.
5. Save LastID to the ini file.

If you need code, just let me know and I'll create the program and post the code here.
0
 
LVL 18

Expert Comment

by:Johnjces
ID: 20501470
Did any of this help you?

John
0

Featured Post

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!

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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 course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

610 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