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.

Using hw keys in MS Smartphone

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-24-2008, 05:55 PM
Newbie
 
Join Date: Feb 2008
Posts: 7
Default Using hw keys in MS Smartphone

Hi all.

I am beginner with b4ppc and I need help from someone,more experienced.
I want to develop an application,that should use hardware buttons(as shortcuts for functions) and arrow keys to control that.
After studying all of the documents,I am able to control my application with arrow keys,but here I have some problems,that I want to resolve:
1.I cannot handle numeric keypad(0-9,#,*,maybe also qwerty keys as in MotoQ)
2.I can handle middle button(enter),but after handling that,I get a problem with control this key from another applications even my is closed already. A typical example: xBar is an application,that allows you to switch between running programs by long press middle button. When I am using this key in my programs,I lose this functionality(long press of it),so I am unable to use xBar and after closing my application,I need to restart xBar in order to work.
Someone is able to help me with these problems?

Thanks in advance. Tomas
Edit/Delete Message
Reply With Quote
  #2 (permalink)  
Old 02-25-2008, 07:59 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

How are you handling the arrow keys? With Form_KeyPress?
You can handle the numeric keypad in this event as well.
Reply With Quote
  #3 (permalink)  
Old 02-25-2008, 11:16 AM
Newbie
 
Join Date: Feb 2008
Posts: 7
Default ...

I am handling the keys,following this tutorial...
http://www.basic4ppc.com/help/hardware/index.html
That's not 'form_keybress',but 'HardKeyPressed' event from 'hardware.dll' library.
Can you please show me,how to handle that? Just a simple example form with label control or something similar,that will show,which key was pressed will be very useful,if possible of course.
Thanks a lot.
Reply With Quote
  #4 (permalink)  
Old 02-25-2008, 03:01 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

See the attached example.
Attached Files
File Type: sbp FormKeys.sbp (664 Bytes, 71 views)
Reply With Quote
  #5 (permalink)  
Old 02-25-2008, 03:30 PM
Newbie
 
Join Date: Feb 2008
Posts: 7
Default ...

Wow!

That works very well.
I didn't know about this:

Case Else:
label1.Text = Chr(specialKey)

Thanks once again.
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
ide and arrow keys dennishea Questions (Windows Mobile) 0 09-22-2008 09:45 PM
detect shift, alt and ctrl keys micro Questions (Windows Mobile) 7 07-30-2008 08:05 AM
Game and keys pmu5757 Questions (Windows Mobile) 13 06-01-2008 03:56 PM
Trapping Other Keys Louis Questions (Windows Mobile) 3 05-10-2008 07:20 AM
fax with VM5 smartphone giannimaione Questions (Windows Mobile) 4 07-10-2007 07:29 AM


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


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