[Home]   [Puzzles & Projects]    [Delphi Techniques]   [Math Topics]   [Library]   [Utilities]

Search

 

Search DelphiForFun.org only

Support DFF

 

If you shop at Amazon anyway,  consider using this link. We receive a few cents from each purchase.   Thanks.

In Association with Amazon.com

 

Support DFF

 If you benefit from the website,  in terms of knowledge, entertainment value, or something otherwise useful, consider making a donation via PayPal  to help defray the costs.  (No PayPal account necessary to donate via credit card.)  Transaction is secure.

 

 

Contact

Feedback:  Send an e-mail with your comments about this program (or anything else).

 

Search DelphiForFun.org only

 

 

 

 

Problem Description

This Beginners level program demonstrates code to count and display clicks on a specific button.

Background & Techniques

Here is a simple program (9 lines of user written  code) to answer a user request about how to
display a message showing the number of times  a particular button has been clicked.

Three event exits are defined :

bullet FormActivate exit to initialize the counter to 0.
bullet ClickBtnClick event exit to increment the counter and display the new label
bullet ResetbtnClicik event exit to reset the count to 0 (by setting the counter value to -1 and calling
ClickBtnClick).
 

Running/Exploring the Program 

bullet Download source

Suggestions for Further Explorations

???

 

Original Date: August 5, 2009 

Modified: August 05, 2009

 

  [Feedback]   [Newsletters (subscribe/view)] [About me]
Copyright © 2000-2011, Gary Darby    All rights reserved.