I'm trying to make a calculator programme for fun.
Originally each button click applied a value and this is applied to the calculation.
Seeing all these button clicks made me ask the question of how necessary all this is.
So, would it be possible to have a procedure called with each numeric button keypress where, based on the TCaption of the Sender, ie. 1,2,3 etc., the value of the TCaption is then applied to the calculation ?
Furthermore, would it be possible for the keypress events of the numeric buttons to be seen by a single event on the Form rather than have 10 separate Buttonclick events ?
If I can use the Caption as a value, is TCaption regarded as a string.
I'm asking all this to see how small the code can be for such a project and is its possible before I spend hours pulling my hair out on an impossible idea.
Thanks for any input.