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.

A simple Touch Screen Test application.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-16-2009, 02:31 PM
pdablue's Avatar
Senior Member
 
Join Date: Sep 2007
Posts: 114
Arrow A simple Touch Screen Test application.

Hi,

This application uses the ImageButton control to test as much of the
PDA's Touch Screen area as possible. I created an array of the smallest
sized ImageButtons that I could. The array is 12 buttons across by 13
buttons down the screen or 13 rows by 12 columns for a total of 156
ImageButtons on a 240 x 320 PDA screen.

You simply press each ImageButton and it will change color. Once you
have pressed all 156 buttons you know if all areas of the PDA's Touch
Screen are working properly. It will give you a good idea if all areas of
the Touch Screen can respond to a Stylus pressing down upon it and
being released.

The ImageButton's "down" and "up" events are used. When a button is
pressed the ImageButton will change to a "red" color. When a pressed
ImageButton is released it will change to a "green" color. An ImageButton
that has not been pressed yet will be a "clear" color.

You can change the color of the ImageButton's "down" and "up" states.

It is interesting to know that you can have up to 156 ImageButtons on
one Form on a 240 x 320 PDA screen.

The file "Tscreen.sbp" is the Basic4ppc source code file for the program.
The file "Tst1.JPG" is a screenshot of the program.
The file "Tst2.JPG" is a screenshot of the program.
The file "Tst3.JPG" is a screenshot of the program.
The file "Tst4.JPG" is a screenshot of the program.
The file "Tst5.JPG" is a screenshot of the program.
The file "Tst6.JPG" is a screenshot of the program.
The file "tscreenzip.zip" is the zipped up ARMV4 (.CAB) installation file.
Attached Images
File Type: jpg Tst1.JPG (21.6 KB, 54 views)
File Type: jpg Tst2.JPG (25.4 KB, 32 views)
File Type: jpg Tst3.JPG (25.0 KB, 20 views)
File Type: jpg Tst4.JPG (25.0 KB, 15 views)
File Type: jpg Tst5.JPG (25.5 KB, 16 views)
File Type: jpg Tst6.JPG (25.0 KB, 16 views)
Attached Files
File Type: sbp Tscreen.sbp (56.0 KB, 61 views)
File Type: zip tscreenzip.zip (37.1 KB, 53 views)

Last edited by pdablue : 07-16-2009 at 02:42 PM.
Reply With Quote
  #2 (permalink)  
Old 07-16-2009, 06:32 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 592
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I give up

@Klaus:

312 ImageButton clicks
__________________
.
.
.
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
  #3 (permalink)  
Old 07-16-2009, 09:06 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi pdablue
I don't really understand the usefullness of the program because your buttons are quite big.
20 * 20 pixels, that means that you are just testing an area of 400 pixels, but you dont know if any pixel inside the ImageButton does respond or not.

Your code has a lot of subroutines, you can shorten the code a lot !
Attached the shortened code Tscreen20_20.sbp.

You can create smaller ImageButtons than 20 * 20 pixels.
Attached an example with variable ImageButton sizes Tscreen5_5.sbp.
The default value is 5, but you can change the value of the dx variable.
This program has no menu, it's just to show the smaller ImageButton.

Best regards.
Attached Files
File Type: sbp Tscreen20_20.sbp (20.2 KB, 29 views)
File Type: sbp Tscreen5_5.sbp (1.1 KB, 23 views)
File Type: zip Images.zip (3.9 KB, 28 views)
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #4 (permalink)  
Old 07-17-2009, 05:24 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by klaus View Post
you dont know if any pixel inside the ImageButton does respond or not
Strictly speaking touch screens PDAs do not have pixels but as far as I can see are on most (all? - i can't be dogmatic about that) devices analogue resistive devices that measure voltage at a point along a voltage gradient across both X and Y axes to detect where the stylus. An analogue to digital converter gives a digital indication of the X and Y voltages that the device then scales and offsets to give pixel coordinates.

When we were developing early PDAs the main problems we had were Newtons' Rings appearing as the touch screen layers sagged and stretched in use and non-linearity in the resistive coatings. I suspect that non-linearity concerns are why the position of the calibration points of a device are located where they are. The extreme corner voltages are known as they are the voltage actually applied to the touchscreen. The middle dot is ideally half the applied voltage but the calibration measures it in case it is not. The four other dots between the centre and edge give another set of values that may differ from the ideal so the device now has a four segment linearity "curve" in both X and Y with which to correct the measured voltages.

EDIT:- The best test for touchscreen linearity is to draw with the stylus. You can rapidly test a large area by "scribbling" and it is pretty obvious to the eye if the ink is not following the stylus tip. You just have to be careful not to draw faster than the device can cope with.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.

Last edited by agraham : 07-17-2009 at 05:28 PM.
Reply With Quote
  #5 (permalink)  
Old 07-21-2009, 02:47 PM
Senior Member
 
Join Date: Apr 2007
Location: Kindred,ND
Posts: 122
Awards Showcase
Beta Tester 
Total Awards: 1
Thumbs up Test Pixels

Here is a simple prog. to test pixel and stylus. You can use it however you like Good luck
Attached Files
File Type: sbp apix.sbp (2.0 KB, 44 views)
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
Multi-Touch mhc German Forum 1 05-25-2009 06:27 PM
Application runs Full screen on device but no keyboard mozaharul Questions (Windows Mobile) 2 08-14-2008 10:44 AM
Howto disalbe touch screen ? lee inmo Questions (Windows Mobile) 2 11-08-2007 11:54 PM


All times are GMT. The time now is 12:18 PM.


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