Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6640455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:40:27+00:00 2026-05-25T23:40:27+00:00

I have this problem and don’t know where to start. I need to write

  • 0

I have this problem and don’t know where to start. I need to write a program that will run in WinCE, so Compact Framework will be required, and this program has to write text (a string) wherever the cursor is. I mean, if my program is running, and the cursor is in a notepad window. the text must be displayed in notepad. Or if the cursor is in another application inside a textbox (or textfield if that app was wrote in java), the text must be placed in that textbox.

I’m able to do all the other functionality the program requires, but I don’t know how to do this. As far as I have read, it is done with API’s. And that is all I can understand.

Any help will be apreciated.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:40:27+00:00Added an answer on May 25, 2026 at 11:40 pm

    We use P/Invoke keybd_event to generate keyboard entry. The only other approach I can think of would be to put your string in the clipboard, and generate a paste key stroke. I’m not sure every app you encounter is going to respond to CTRL+V the same. Perhaps there’s a way to trigger the paste programmatically from your app?

    [DllImport("coredll.dll", EntryPoint = "keybd_event", SetLastError = true)]
    public static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);
    

    This should generate a silent A keystroke.

    keybd_event((byte)Keys.A, 0, 0, 0x0004);
    keybd_event((byte)Keys.A, 0, 0x0002, 0x0004);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this problem that I probably understand but don't know how to handle,
I don't know where to look for about this problem ... I have three
I have a weird problem, and I don't know if this is the default
I have this problem in IE8 that ignores my first stylesheet link. I don't
I have this problem and really don't know how to solve this. I'm having
This may be subjective, I don't know: I have this problem, which I'm kind
I have this problem and I don't know what is the best solution for
I have this problem but I don't know how to name it, for instance,
I have this problem when I deploy, I really don't know how to solve
I have this problem that my sites uses alot of ajax and when a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.