IonicWind Software

IWBasic => Tutorials => Topic started by: Andy on September 12, 2018, 01:21:07 AM

Title: Useful tips part 1
Post by: Andy on September 12, 2018, 01:21:07 AM
Hi,

I thought it would be nice to post this program as it shows you several things which anyone new to IWB (or maybe not) might find useful.

It is a program that simulates entering a license key.

The program has four edit boxes and an "OK" button, when all edit boxes are filled the "OK" button is enabled.

The following code shows you how to:

1. Make it easy to assign control numbers.
2. Force upper case letters in an edit control.
3. Vertically center text of a static.
4. Limit the number of characters in an edit control.
5. Detect when text has changed in an edit control.
6. How to set the cursor to the end of any existing text.
7. Sub class a control so we can make it do what we want it to do.

The program is designed to only allow letters A to Z, a backspace, and a Tab.

When one edit box has four letters in it, it automatically jumps to the next edit box, when all edit boxes are "full" the "OK" button is enabled.

You can use backspace to delete letters and even move back to the previous edit box.
You can use the Tab button to jump to the next edit box providing that the edit box contains four letters.

I've spent a lot of time commenting the code, so just take your time and have a read - spelling mistakes and all!

Thanks,
Andy.
Title: Re: Useful tips part 1
Post by: billhsln on September 12, 2018, 08:44:57 AM
Very nice will take some time studying the code.

Bill
Title: Re: Useful tips part 1
Post by: Andy on September 12, 2018, 09:30:31 AM
Thanks Bill!  :)

I just think most of this code is really useful and helpful, and hopefully it explains what is going on in the program and why.
Hope it helps someone.

Andy.


Title: Re: Useful tips part 1
Post by: h3kt0r on September 28, 2018, 04:47:56 PM
Thanks for sharing !

;) Really useful.