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.

getting the Pressed Key in the KeyPress event

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-05-2008, 04:49 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default getting the Pressed Key in the KeyPress event

Hi,

Been playing around with the door lib, trying to make sense of it, and how to expose some controls events...

I've been able to expose a keypress event, but how can I know what key was pressed...
I want to be able to "read the hole keyboard...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #2 (permalink)  
Old 09-05-2008, 05:07 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

Look in the Door help for Event.Data. That's got the EventArgs for the event in it. Google for its members.
Code:
Sub KeyPressEvent_NewEvent
    o.Value =KeyPressEvent.Data 
'Get the event's KeyPressEventArgs
    KeyChar = o.GetProperty("KeyChar "'Returns the character
End Sub
You will get more information from the KeyUp or KeyDown events which return a KeyEventArgs object - more Googling
Reply With Quote
  #3 (permalink)  
Old 09-05-2008, 05:17 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

I got it working...

My main problem was how to retrieve the info...
then I found you litle text help on trhe door thread, wich made it clear...
Thanks Andrew...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
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
Keypress ceaser Questions (Windows Mobile) 2 05-28-2008 04:21 AM
Keypress and SelectionChanged.. robee9931 Questions (Windows Mobile) 1 05-27-2008 03:08 PM
Delete keypress emaster Questions (Windows Mobile) 2 12-04-2007 06:15 AM
TreeView event magi6162 Questions (Windows Mobile) 3 08-29-2007 10:29 AM
How to create endless loop with keypress Stellaferox Questions (Windows Mobile) 10 05-17-2007 08:09 PM


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


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