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

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

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Questions on SpecialKeys

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-26-2008, 11:18 AM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default Questions on SpecialKeys

Hi,

As I have no room on the screen for a menu bar or additional button I want the middle Hardware Key to be used to ask for help information.

As far as I can test, the form needs to have the focus in order to activate the Sub Form1_KeyPress (SpecialKey). This works with me only when the Form is originally loaded. Setting somewhere Form1.Focus does not set the focus on the Form.

The above acts like that in executing the exe; working in debugging mode on the device, the effects are different.

A strange effect I found during testing, is that pressing the middle Hardware Key, without having a Sub Form1_KeyPress (SpecialKey), causes the label having the focus on the moment of pressing to loose its text or may be a space is inserted in front of the text. The labels are that small that they can only show one digit.

The test file attached illustrates the unexpected effects. Interested forum members should run that program, both as exe on the device as in debugging mode on the device.

My device is a P350 of Mitac.

Who can give some help?

Harry
Attached Files
File Type: sbp FormKeys.sbp (998 Bytes, 17 views)
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 12:15 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

There is only one large label in this attachment.
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 12:20 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

I believe it shouldn't work at all without adding the hardware library and the Hardkey object.
Read the help for declaring a Hardkey object (new1) - it says :

OnlyWhenFormIsActive - If set to true then the keys will be caught only when the specified form is active.

It means that if set to false - the key will be active no matter which form is displayed.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 01:02 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default

Erel,

I attached the wrong file. Now the corect one is attached.

Harry
Attached Files
File Type: sbp FormKeys.sbp (998 Bytes, 27 views)
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 01:22 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default

derez,

Many thanks for your help. Everything clear now. Strange that it worked to a certain extend without a HardKey object.

Harry
Reply With Quote
  #6 (permalink)  
Old 02-26-2008, 01:55 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 HARRY View Post
Strange that it worked to a certain extend without a HardKey object
Not strange. You were trying with the very limited facilities built-in to a B4PPC Form which, as you found out, fails once an object that can accept the focus is placed on the form. The library provides a different and more complete mechanism for dealing with the Special Keys.
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
A few questions regarding FormLib N1c0_ds Questions (Windows Mobile) 6 09-19-2008 02:34 AM
Newbie Questions Bruno Questions (Windows Mobile) 2 05-05-2008 06:45 PM
One of my stupid questions.... Cableguy Questions (Windows Mobile) 7 01-27-2008 10:26 AM
More SQL questions HARRY Questions (Windows Mobile) 2 01-04-2008 10:15 AM
SQL Questions tcgoh Questions (Windows Mobile) 7 12-31-2007 09:10 AM


All times are GMT. The time now is 08:48 AM.


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