Re: Sending Keystrokes

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Control keys are problematic with PostKeybdMessage. keybd_event works much
better for that sort of key.

Paul T.

"dbgrick" <dbgrick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2E1B1E39-0C76-4FEF-AAB6-0A069E5AF310@xxxxxxxxxxxxxxxx
Here is the Pinvoke.net reference:

http://pinvoke.net/default.aspx/coredll.PostKeybdMessage

Regards,
Rick D.
Contractor

"dbgrick" wrote:

You can P\Invoke the follwoing method PostKeybdMessage. Here is the
pertinent web page:

http://msdn2.microsoft.com/en-us/library/ms910657.aspx

I Hope this helps.

Regards,
Rick D.
Contractor

"Arthur Dent" wrote:

Hello all...

I am trying to send keystrokes to an application. The application is
irrelevant. My software resides on a Symbol unit with a mag-stripe
reader.
What we want is for the user to be able to configure a prefix and
suffix, so
that when they swipe a card, it will read the card, prepend/append the
prefix and suffix and then just forward on all that string data to the
currently active window. The BIGGEST point of this, is control
characters,
so that the user can set a suffix of TAB + ENTER, such that when a card
is
swiped, it will put the read data into a text field, then automatically
tab
to the next control (a button) and press enter, thereby submitting a
form.
(this other application is some 3rd party 'ware we have no access to
change).

Everything works fine, except for the control characters. They work
kind of,
but not the way we need... if i have open a wordpad or notepad type
app, it
will insert the TAB and CR into the document as you would expect. But
in a
form, the tab character doesn't advance controls (it just beeps) and
the
enter key the same, it doesnt actually press a button (even if i put
the
focus on the button first), again, it just beeps.

I am using the SendKeys code from OpenNETCF.org, I have tried sending
the
keys using the escape words as in the code ("{TAB}" and "{ENTER}") and
i've
tried actually just embedding Chr(9) and Chr(13) in the text string
being
processed. But neither works.

Please help, i Have to be able to send control keystrokes to the
focused
form.

Thanks in advance,
Arthur Dent.



.



Relevant Pages

  • Re: Tab symbol
    ... with the advantage of deviating from normal text even when CSS is off. ... forward tab, ... You could use real arrow characters there, too, for more similarity. ... For symbols for keys, a solid or outset border might be suitable; for control characters, maybe dashed or dotted. ...
    (comp.infosystems.www.authoring.html)
  • Re: Reading in file containing Low Values doesnt work correctly
    ... line sequential record it will be processed and all control characters ... control character that needs to be preserved. ... printable, nor is it a normal control character like TAB or Linefeed. ... another then the low-values prefix acts as an escape character. ...
    (comp.lang.cobol)
  • Re: Asp.Net AJAX dynamically added Tab Control not displaying
    ... TabPanel assumes there's no active tab and it hides all the tabs at client ... protected void Page_PreRender ... Microsoft is providing this information as a convenience to you. ... does not control these sites and has not tested any software or information ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Subform trouble for New User
    ... control as suggested. ... I didn't use that field in the Subform Field Linker). ... The structure of this tab is ... continuous form.I have limited the fields in the continuous form to ...
    (microsoft.public.access.forms)
  • Re: Dialog Class "A" Accessing Data In Derived Dialog Class "B", "C", & "D"
    ... For example, if the information is controlled by the parent, and the tab control is just ... Every change in a tab is immediately reflected to the parent. ... private member variables are set. ...
    (microsoft.public.vc.mfc)