Raising Keydown events

G

Guest

Hi,

We're developing for touchscreen, and created a homegrown keyboard that
receives events based on what's clicked on the screen.
Now we want to pass on this keycode to another form/field
Can we raise our own keydown events(having trouble trying to arrange this)
that the other form/field can handle or is the advise to use the .SendKeys
method?
A sample would be highly appriciated....

tanx,
Derk Jan
 
G

Guest

I suggest you not go that route. MS gives guidance about when they raise
events like KeyDown and how the the program can respond. They say nothing
about you raising such events. SendKeys is about as close as they get, and
in my view, SendKeys is a kludge (opinions may vary).

What you have is a classic issue with windows programming - a functionality
that needs to be triggered in more than one way (mouse, keys, controls, etc).
I suggest you code the functions that you want, but separate them from the
gui elements that might trigger them. Then, call the functions from all the
appropriate places, eg your homegrown keyboard event handlers, mouse event
handlers, the real keyboard handlers, and whatever else.

I know you wanted something more specific, but your question leads me to
believe that .net events and your app's functionality are in a tangle.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top