Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed 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: 2,780
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: 2,780
Default

See the attached example.
Attached Files
File Type: sbp FormKeys.sbp (664 Bytes, 39 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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Game and keys pmu5757 Questions & Help Needed 13 06-01-2008 03:56 PM
Trapping Other Keys Louis Questions & Help Needed 3 05-10-2008 07:20 AM
Reading Registry Keys - Bug or Mistake? Raytracer Questions & Help Needed 1 04-18-2008 04:31 PM
Soft Keys on Smart Phones? Louis Questions & Help Needed 1 02-21-2008 05:49 AM
Capturing the arrow keys on the desktop Louis Questions & Help Needed 1 08-31-2007 09:01 PM


All times are GMT. The time now is 09:16 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0