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.

a question for Erel

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-23-2008, 07:02 AM
Basic4ppc Veteran
 
Join Date: Sep 2008
Location: Brisbane, Australia
Posts: 317
Default a question for Erel

Hi mate.

I'm wondering how to do a sendkeys in B4PPC.

I can create a control either in vb or C# that would fire a KeyPressed(key) event based on what key I press.
In my B4PPC code I'd get the key but how do I send it to the control that has focus?

I've searched the forum for sendkeys and got 1 entry in Italian.

I looked at the link but I'm not sure how to make it work on the B4PPC side.

regards, Ricky

I created a quick custom panel with a button.
When I click the button my textbox loses focus. I don't want it to lose focus. Not sure how to change this behaviour.

Also using C# how do I pass back the button pressed on my sip in the KeyPressed event?

Last edited by Ricky D : 10-23-2008 at 08:23 AM. Reason: Another question
Reply With Quote
  #2 (permalink)  
Old 10-23-2008, 09:29 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Did you try these functions:
Hardware.KeyDown, Hardware.KeyPress and Hardware.KeyUp ?
Reply With Quote
  #3 (permalink)  
Old 10-24-2008, 06:06 AM
Basic4ppc Veteran
 
Join Date: Sep 2008
Location: Brisbane, Australia
Posts: 317
Default no i haven't but

No I haven't but what I'm forced to do is write my own sip based on 2 panels - 1 for abc and the other for numeric.

Either that or send the built in sip something to click the little 123 button it has if I make the keyboard large.

I'd like to show the number pad when a number textbox receives focus and show the alphabet when a text textbox receives focus.

If I create my own sip in C# I notice that when I click one of its buttons the button gets focus and the control being typed into loses it.

Could I detect a mouse press on the panel on say a label and not have it receive focus?

regards, Ricky

p.s i looked at the hardware and it looks like it will do the key sending. Thanks for that. Now to solve the focus issue

I've figured it out. using dzEventsMagic and Hardware I have put labels on a panel that will sit where the sip would sit and it does just what I want - yay! Now to code it all - I need 1 dzEventsMagic object per key and the corresponding dz_MagicEvent sub. In the sub i use hardware to send the key to the control using the KeyPress method.

I can do all this in B4PPC without having to resort to creating a new dll.

Last edited by Ricky D : 10-24-2008 at 06:59 AM. Reason: looked at hardware
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
question for erel re hardware library Ricky D Questions (Windows Mobile) 0 10-30-2008 06:59 AM
a question for erel or agraham or anyone else Ricky D Questions (Windows Mobile) 14 10-29-2008 06:43 PM
A query to Erel mozaharul Questions (Windows Mobile) 5 04-28-2008 11:21 AM
Library folder question to Erel agraham Questions (Windows Mobile) 6 11-11-2007 04:27 PM
Erel - Any policies on attachments? agraham Questions (Windows Mobile) 1 07-11-2007 05:03 PM


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


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