Copyright: Copyright Auric Visions (c) 1996
Citation: {This is the Citation which can be altered from the DotHLP Preferences screen, accessed from the Tools menu.}


 TTipOfTheDay Component

Properties 	Methods          Tasks	        Registration

Unit

TipOfDay

Description

Use a TTipOfTheDay component to add professional looking help tips to your application. Help Tips allow novice users to quickly get to grips with your application by reminding them of quick tips like keyboard combinations or efficient ways of performing common tasks.

To add Help Tips to your application simply drop a TipOfTheDay component on your main form, add the tips and call it's execute method. See tasks for a step by step example.

© Auric Visions Ltd 1996. eMail 100271.1164@compuserve.com


 AllowShowTipsOnStartup Property

Applies to

TTipOfTheDay

Declaration

property AllowShowTipsOnStartup: Boolean;

Description

True by default, when the Tips dialog is displayed the "Show Tips on Startup" checkbox is visible. This allows the user to specify whether they want to have the tips dialog automatically appear every time they start your application, or not.

When False, the checkbox is not visible and the dialog screen shrinks in height. This is very useful if you want to implement TipOfTheDay in it's simplest form, i.e. from a button or menu without recording the users request to ShowOnStartup in an ini file.


 Caption Property

Applies to

TTipOfTheDay

Declaration

property Caption: String;

Description

This is the caption that will appear on the title bar of your TipOfTheDay dialog. The default caption is "Tip of the Day". You can change it to anything you like, i.e. "My Tips".


 DialogColor Property

Applies to

TTipOfTheDay

Declaration

property DialogColor: TColor;

Description

This is the color of the Dialog box. You can change it to anything you like. Simply click on the elipsis to the right of the property and select a color from the dialog box that appears.


 DialogFont Property

Applies to

TTipOfTheDay

Declaration

property DialogFont: TFont;

Description

This is the font for the Dialog box. You can change it to anything you like. Simply click on the elipsis to the right of the property and select the font options from the dialog box that appears. This will affect the buttons and the Show Tips at Startup text.


 ShowTipsOnStartup Property

Applies to

TTipOfTheDay

Declaration

property ShowTipsOnStartup: Boolean;

Description

You can use this to allow your users the choice of automatically displaying TipOfTheDay at startup, i.e. when your application first loads. Experienced users will tend to set this to False while novice users will want it automatically displayed.

The normal way to implement this is via an ini file. You can check in your main form's Create event to see if the users last choice was to display TipOfTheDay, and if True then call it's execute method, i.e.

    if iniFile.ReadBool('Help', 'ShowTipOfTheDay', True) = True then begin

      TipOfTheDay1.ShowTipsOnStartup.Checked := True; {reflect the users ini settings}

      TipOfTheDay1.Execute;

    end;

Then in your applications main forms Close event you could set the users last choice, i.e.

  if ShowTips = True then

    iniFile.WriteBool('Help', 'ShowTipOfTheDay', True)

  else

    iniFile.WriteBool('Help', 'ShowTipOfTheDay', False);

("ShowTips" above is a global boolean variable.)

Because of the way Windows and Delphi work, calling a dialog immediately after loading your main form causes the dialog to be displayed before the main form. To get around this you need to post a custom message to allow the correct sequence of events to occur. An example project is included with TipOfTheDay to show you just how to do this.

One last thing about ShowTipsOnStartup. If you don't want to give your users this option at all then you can hide it by setting the AllowShowTipsOnStartup property to False.


 Tips Property

Applies to

TTipOfTheDay

Declaration

property Tips: TStrings;

Description

This is where you maintain your tips. Click on the elipsis to the right of this property and the Strings dialog box will appear. Just type in each tip, one per line. Remember the TipsTitle precedes each line of text. The default TipsTitle is "Did you know..", so you need to begin each tip with this in mind, i.e.

    "Did you know.. You can press F1 for Help."

So your tips would generally begin with "You can.." or "If you..".

Limits

Each Tip can be up to 255 characters and you can have up to 32 thousand tips.


 TipsBackgroundColor Property

Applies to

TTipOfTheDay

Declaration

property TipsBackgroundColor: TColor;

Description

This is the area the Tips are displayed on and you may want to change this depending on your TipsFont settings and your own preferences. By default the background is an off-yellow color to simulate the look of the Windows 95 Help system background. To change this, click on the elipsis on the right of the property and select the new color.


 TipsFont Property

Applies to

TTipOfTheDay

Declaration

property TipsFont: TFont;

Description

This is the font, style, size and color your Tips appear in. By default this is MS Sans Serif, 8 points, Black. To change it, click on the elipsis on the right of the property and select your new settings.


 TipsTitle Property

Applies to

TTipOfTheDay

Declaration

property TipsTitle: string;

Description

This is the leading text for your Tips. By default it is "Did you know..." but you can change it to anythng you like.


 Execute: Method

Applies to

TTipOfTheDay

Declaration

function Execute: Boolean;

Description

This is how TipOfTheDay is launched. Simply call the component name followed by the Execute method, i.e.

  TipOfTheDay1.Execute;

The TipOfTheDay dialog will appear and one of your Tips will be randomly selected and displayed.


Tasks

 Using the TTipOfTheDay Component

Purpose

To add a simple TipOfTheDay facility to my application.

Tasks

1. Place a TipOfTheDay component on your main form.

2. Double-click its Tips property and fill in your tips, one per line.

3. Add a menu option or button to load TipOfTheDay.

4. Select its OnClick event and add the following line :-

TipOfTheDay1.Execute;

5. Run your application and test.


 Registration

You can use this version of TipOfTheDay to evaluate it and to see if it suits your needs. If you wish to continue to use it then you must register it. Registration is easy and inexpensive. Registration costs US$25 and gets you full source code, so you can use it for Delphi 1 and 2, and three months free support.

Via CompuServe

If you have a CompuServe account you can register via SWREG. GO SWREG and select Registration id #13964, the registration fee of US$25 will appear on your Compuserve account. TipOfTheDay will be eMailed to you.

By Credit Card

You can order with MC, Visa, Amex or Discover from Public (software) Library by calling 800-2424-PsL or 713-524-6394 or by FAX to 713-524-6398 or by CIS Email to 71355,470. You can also mail credit card orders to PsL at P.O.Box 35705, Houston, TX 77235-5705.

        Please quote product id #15015

PsL will notify us the day of your order and TipOfTheDay will be eMailed to you. If you wish to receive TipOfTheDay by Postal service then please include $5 for carriage and packing and allow 14 days for delivery.

THE ABOVE NUMBERS ARE FOR CREDIT CARD ORDERS ONLY. GARY HANDLEY CANNOT BE REACHED AT THESE NUMBERS.

Any questions about the status of the shipment of the order, refunds, registration options, product details, technical support, volume discounts, non-credit card orders, etc, must be directed to Gary Handley via Email on 100271.1164@compuserve.com.

Other Products form Gary Handley & Auric Visions Ltd

DotHLP, The Visual Help Generator

DotHLP is a Windows Help file generator written in Delphi. With DotHLP you can generate a fully functional Windows Help File in under a minute, from there all you have to do is fill in the text. DotHLP is Visual and extremely intuitive. This help file was created using DotHLP. For more information please contact Gary Handley on 100271.1164@compuserve.com.


Properties

AllowShowTipsOnStartup	DialogFont	TipsBackgroundColor
Caption	ShowTipsOnStartup	TipsFont
DialogColor	Tips	TipsTitle


Methods

Execute:


Next Tip

Displays the next randomly selected Tip from the available list.