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.

detect shift, alt and ctrl keys

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-26-2008, 04:46 PM
Senior Member
 
Join Date: May 2008
Posts: 174
Default detect shift, alt and ctrl keys

hi to all,
how i can control the pressure of simultaneous keys "shift or ctrl or alt" with other keys with the library door?
The KeyPress event with door is the same as basic4ppc, I think I should use the KeyEventHandler for ceck all keys, is right?
And how can I use it?

Thanks
Reply With Quote
  #2 (permalink)  
Old 07-26-2008, 05:49 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Are these key presses related to a specific control (maybe TextBox)?
Reply With Quote
  #3 (permalink)  
Old 07-26-2008, 06:19 PM
Senior Member
 
Join Date: May 2008
Posts: 174
Default

Yes Erel,
the control are TextBox.

Best Regards
Reply With Quote
  #4 (permalink)  
Old 07-26-2008, 07:01 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

See the attached file.
Code:
Sub Globals
    
'Declare the global variables here.

End Sub

Sub App_Start
    Form1.Show
    
object.New1(false)
    
object.FromControl("textbox1")
    event.New1(
object.Value,"KeyDown")
End Sub
Sub event_NewEvent
    
object.Value = event.Data
    keys = 
object.GetProperty("Modifiers")
    
If StrIndexOf("Alt",keys,0) > -1 Then 'handle alt
        form1.Text = "alt"
    
End If
    
If StrIndexOf("Shift",keys,0) > -1 Then 'handle shift
        form1.Text = "shift"
    
End If
    
If StrIndexOf("Control",keys,0) > -1 Then 'handle alt
        form1.Text = "control"
    
End If
End Sub
Attached Files
File Type: sbp modifiers.sbp (880 Bytes, 22 views)
Reply With Quote
  #5 (permalink)  
Old 07-26-2008, 08:46 PM
Senior Member
 
Join Date: May 2008
Posts: 174
Default

ok Erel, it's work.
I added the event KeyUp to make null the variable keys.
What are the other properties of GetProperty than "Modifiers"?
Where can I find other features more detailed?
And if I want to capture the scan code (for all keys)?

Thanks

Last edited by micro : 07-26-2008 at 08:58 PM.
Reply With Quote
  #6 (permalink)  
Old 07-27-2008, 03:57 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You can see the full list of properties here: KeyEventArgs Members (System.Windows.Forms)
Reply With Quote
  #7 (permalink)  
Old 07-27-2008, 04:53 AM
Senior Member
 
Join Date: May 2008
Posts: 174
Default

thanks Erel,

Best Regards
Reply With Quote
  #8 (permalink)  
Old 07-30-2008, 08:05 AM
MM2forever's Avatar
Senior Member
 
Join Date: Jun 2007
Location: Germany
Posts: 103
Send a message via ICQ to MM2forever Send a message via MSN to MM2forever Send a message via Skype™ to MM2forever
Default

How can i do global Hotkeys with a Desktop App?


EDIT:// I did an extra-Thread for this question:
http://www.basic4ppc.com/forum/quest...d-b4p-app.html
__________________
Regards, Christian


Last edited by MM2forever : 07-30-2008 at 09:46 AM. Reason: Moved to different Thread
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
Detect ActiveSync connection Lasse Questions (Windows Mobile) 2 07-27-2008 08:51 AM
Any way to generically detect a click anywhere? BurninSun Questions (Windows Mobile) 3 07-18-2008 11:16 PM
Hold SHIFT, and press TAB on Desktop app superbabicka Questions (Windows Mobile) 3 04-30-2008 04:52 PM
How to detect which is PPC and PPC Phone? conf Questions (Windows Mobile) 6 07-31-2007 06:09 PM
How to detect whether SIP is active / not? belotrei Questions (Windows Mobile) 5 06-01-2007 04:22 PM


All times are GMT. The time now is 10:07 AM.


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