CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2008
    Posts
    10

    Background application, data to focused window

    Hello, I would consider myself a part-time programmer, who can work around Visual Studio and produce relatively simple Windows & CE Apps. I am working with a DLL and am comfortable using that to read my hardware and return the required data.

    However, what i am now looking to do, which I have no experience with is; run an application as a background task that montiors the port for activity and on activity return a specific piece of data and populate the currently focused text box of any other application.

    I can handle all the hardware and DLL aspects, i'm specifically looking for advice on how to run as a background app and send data to an in focus text box of another application, if no text entry box is in focus the data may be ignored.

    I hope that makes sense, in summary;

    1. I have code and hardware that detects activity and returns data, no problem.
    2. I would like this to continue running when minimised / out of focus (system try or service could come later)
    3. I would like the data (string) to populate the currently focused text entry point, if available.

    Assuming point 2 is relatively simple, is there a way to send the data from the application as a keyboard entry? so would go straight into Word, Notepad, TextBoxes, anything where the cursor is focused?

    Any help much appreciated.

    Cheers,

    Matt

  2. #2
    Join Date
    Nov 2008
    Posts
    10

    Re: Background application, data to focused window

    Think I have found the command required, should this simply use System.Windows.Forms.SendKeys.Send(myString)

    Will look at this later in the week.

    Cheers,

    Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured