Annihil8

Hi,

I have a Ipaq with rfid reader.
When I am in notepad/word i can press a hardwarebutton and the id of the rfid tag will be entered by the keyboardwedge.

So I thought oke lets do that in a c#program :)

It works when i have a textbox with focus.

My problem is that i dont have a textbox on the form and i dont want to put one because an user isnt allowed to see the id.

I used the keypreview = true and a key_down event. When I scan the event is triggered but only once and i get a keycode=none .

Does anybody know how to solve this or any other easy way to create an 'automatic' keyboardwedge

Grtz

Annihil8



Re: .NET Compact Framework RFID with Keyboardwedge

Annihil8

it does the same with a keypress event :(



Re: .NET Compact Framework RFID with Keyboardwedge

timg_msft

try putting a text box on your form, but outside it's bounds (above and to the left of the form). When the HW button is pressed, give the textbox focus to slurp in the RFID information. Once the data is read, restore focus to where it was before.




Re: .NET Compact Framework RFID with Keyboardwedge

Annihil8

Hi,

I've tried that but the HW button of the device is not a standard button. It is a trigger like a gun. I dont know how the explain in else.
For those 'special' HW you cant use the e.Keycode because it is 'special' key.

Grtz

Annihil8





Re: .NET Compact Framework RFID with Keyboardwedge

timg_msft

Are you saying you have no way of determining if the trigger has been pulled




Re: .NET Compact Framework RFID with Keyboardwedge

Annihil8

Indeed, the only thing that i could use for determining the trigger is a textstring wich fills up with the chars coming from the textwedge. I can give the rfid a prefix and suffix. So if i find those two in the string I could say the trigger has been pulled. And that brings me back to the problem that the keys arent filled in the string with the keydown/press event :)

Grtz

Annihil8





Re: .NET Compact Framework RFID with Keyboardwedge

timg_msft

You said in your original post that it works if your form has a textbox with the focus, but you don't want to add a textbox to to the form because that would allow your user to see the id that is scanned in. How about if you add a textbox to your form and give it focus, but set its PasswordChar property to '*'. The ID would be entered into the textbox and retrievable via code, but all the user would see is a string of '*' characters.

Not knowing the details of your HW, this is as good as I can come up with.






Re: .NET Compact Framework RFID with Keyboardwedge

Annihil8

This would give the same problem as earlier mentioned. You dont know when somebody has scanned. So you dont know when to put the focus on the textbox.

The textbox on my first post was a testcase, so i clicked on the textbox myself. That is not possible in the real application.





Re: .NET Compact Framework RFID with Keyboardwedge

timg_msft

I would suggest contacting the manufacturer of the hardware to find out how to determine that a scan is happening.