Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.

Event Countdown Timer

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-08-2007, 06:48 AM
Senior Member
 
Join Date: Apr 2007
Location: Arlington, Washington USA
Posts: 176
Default Event Countdown Timer

Here is a little app that counts down the time to an event. Not exactly a mission critical application, but it can be fun.

FEATURES:
You can change the text strings and target time.

Multiple events and target times can be stored in an event db (e.g., New Years, Christmas, Halloween, Birthdays, Retirement date, etc.).

User can set one of the events as the default event to use on startup.

If no event db is present on startup, a default db is created with the event of the next New Year's Day.

ENJOY!

27 January 2010 - V1.1 Fixed bug causing crash.
28 January 2010 - V1.2 Fixed bugs identified by Taximania
29 January 2010 - V1.3 Added fix by Klaus to Calendar/timer, changed behavior after passing event time.
Attached Images
File Type: jpg Display1.jpg (18.8 KB, 63 views)
File Type: jpg Display2.jpg (18.7 KB, 27 views)
File Type: jpg NewEvent.jpg (17.9 KB, 28 views)
File Type: jpg EventDb.jpg (12.2 KB, 25 views)
Attached Files
File Type: zip Countdown13.zip (274.5 KB, 94 views)

Last edited by dlfallen : 01-30-2010 at 07:12 AM. Reason: Bug Fix
Reply With Quote
  #2 (permalink)  
Old 06-08-2009, 07:32 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default



This is what I've just spent a few hours of my life trying to produce.

Point being:

Use the search facility on the forum, it might save you hours of head scratching

EDIT: All my regular taxi customers keep saying, not long till the wedding now is it.
It's 23th Aug 2009, if I'd not already mentioned it. Think I have.
At least I can tell them exactly, just for the grin.
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk

Last edited by taximania : 06-08-2009 at 07:37 PM. Reason: As above.
Reply With Quote
  #3 (permalink)  
Old 01-27-2010, 07:31 PM
Senior Member
 
Join Date: Apr 2007
Location: Arlington, Washington USA
Posts: 176
Default

Maybe Taximania is the only one to have used this program, but thought I would post a bug fix anyway - just in case.

The original post now as V1.1 attached which fixed a bug causing a crash if all Event Database items were deleted. I also added screenshots for the curious.

-Dave Fallen
Reply With Quote
  #4 (permalink)  
Old 01-28-2010, 07:25 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Just a couple of bugs.

Because you check for TextBoxHr_keypress(key) etc
once you enter a number in the textbox, you can't edit it
because left right and backspace are ignored.
Also the old values aren't cleared if you set another event.

The SIP hides the Hr Min Secs Textbox's

I've attached my modified version of the original program to this post.
for you to consider. It still has the DB probs though.
Attached Files
File Type: sbp CountDownOrigMod.sbp (8.5 KB, 22 views)
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #5 (permalink)  
Old 01-28-2010, 08:32 PM
Senior Member
 
Join Date: Apr 2007
Location: Arlington, Washington USA
Posts: 176
Default

Thanks for the feedback! I have fixed the problems you identified.

You actually could edit the entries in the previous version by highlighting the number with your stylus. Then, any new number would replace the original. I followed your suggestion to a better solution: Now the backspace key is recognized to make editing a little easier. It still filters for numbers like the previous version.

Old values are cleared when adding a new event.

I also rearrainged Form2 so the textboxes are not hidden by the SIP. I hadn't noticed this before because my devixe is a WQVGA so the SIP doesn't hide anything. Since writing this program I have installed an emulator so I currently test programs on a variety of platforms before I release them.

Thanks again, Taximania, for your input!
Reply With Quote
  #6 (permalink)  
Old 01-29-2010, 11:01 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,827
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi Dave,

I had also a look at your program, and tried short countdowns of a few tenths of seconds and the program showed much more time.
I found a 'strange' behaviour of the Calendar control.
The Calendar.Value is by default initialized to Now and not to the todays date value. When you open the Calendar and click onto the totay's date then the Calendar.Value is OK.

To avoid this you should add in the AppStart rotine following line:
Code:
<font face="Courier New"><font size="2"><font face="Courier New"><font size="2">Calendar1.Value=</font></font></font></font><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">DateParse</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">(</font></font></font></font><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">Date</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">(</font></font></font></font><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff"><font face="Courier New"><font size="2"><font color="#0000ff">Now</font></font></font></font></font></font></font></font></font><font face="Courier New"><font size="2"><font face="Courier New"><font size="2">))</font></font></font></font>
Best regards.
__________________
Klaus
Switzerland
Reply With Quote
  #7 (permalink)  
Old 01-29-2010, 05:31 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I too noticed that Klaus, but wasn't sure how to correct it
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #8 (permalink)  
Old 01-29-2010, 05:35 PM
Senior Member
 
Join Date: Apr 2007
Location: Arlington, Washington USA
Posts: 176
Default

Thanks, Klaus - I have added that line to my program.

I won't post an update to my program until I finish a couple of more changes. I am adding a Years textbox so one can set events more than one year into the future. Also, once an event time has passed, the program displays negative and positive numbers, not too useful! I am going to change that behavior so the program will display the amount of time subsequent to the event having occurred.

-Dave
Reply With Quote
  #9 (permalink)  
Old 01-30-2010, 07:15 AM
Senior Member
 
Join Date: Apr 2007
Location: Arlington, Washington USA
Posts: 176
Default

OK, I hope this is a wrap.

I added the fix suggested by Klaus for the Calendar control.

I fixed the behavior of the program to display the time SINCE an event, once the event time is passed (see screenshot in first post).

Got rid of some ugly colors.

I did abandon the idea of adding Years and/or Months to the countdown. Weeks, days, hours, and minutes are all simple multiples of seconds. Months and years are not. It could be handled, but just didn't seem worth the effort.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Timer To Close MsgBox? cdeane Questions (Windows Mobile) 6 10-06-2010 09:22 AM
Timer component 2220 Questions (Windows Mobile) 4 09-27-2008 08:41 PM
cTicksPerDay: optimised compilation error with timer LineCutter Bug Reports 2 04-21-2008 07:15 PM
How to use timer to clock speed of subs? Stellaferox Questions (Windows Mobile) 4 02-28-2008 08:07 AM
out-of-memory-error based on timer after switching to V6 Frank Questions (Windows Mobile) 2 01-17-2008 04:26 PM


All times are GMT. The time now is 02:02 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0