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

  • SEARCH
  • Home
  • 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 5957267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:22:35+00:00 2026-05-22T18:22:35+00:00

I need to type something in a textbox inside a web-browser control. Simply setting

  • 0

I need to type something in a textbox inside a web-browser control. Simply setting the value doesn’t work because this doesn’t run javascript.

So:

  1. InvokeMember: I thought I could use invokemember for this(since there’s InvokeMember("Click")). But google is silent about keyboard events.

  2. Focus the element and then send keys to the control. It works(Sendkeys.Send), but only if the control is activated. If I switch to another window, it will send keys completely, but not where I want to.

  3. Javaspript: Is there a way to find out which javascript runs when I change the value of a textbox? I don’t know much about javascript. Elements attributes don’t have something like OnClick/OnKeyUp etc.
  • 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-22T18:22:36+00:00Added an answer on May 22, 2026 at 6:22 pm

    So… In case anybody is interested.

    1. InvokeMember doesnt have anything for key pressing.
    2. Its impossible to send keys to the control.
    3. There is a way to “send keys” using iQuery which… is fake and poorly-designed. It doesnt help in my case. And when it does “send key”, “InvokeMember(“OnKeyUp”)” works as well.

    What is possible? Its possible to send keys to a window… Teoretically its possible to send keys to unactive window(using SendMessage() and PostMessage()), but practically nobody has successfully done this since WinXP & x32 times…

    I didnt try myself, but there are people who was able to send keys using “SendInput”. But this useless anyway, cause the function can only send keys to active window.

    So… SendKeys.Send(which, i guess, is a wrapper for SendInput) is still the best way around.

    Solution

    I created a form(window) for my webbrowser control. I initialize it, but dont use “Show”. Then i simply make this form active right before “SendKeys.Send”(dont forget to focus on both element(inside the control) and control(inside the form) as well). Since there is no form to show, user doesnt notice anything and keys go to the right window. If its needed, its possible to save the handle of window which was active previously and make it active again after the sending(so focus wont be lost).

    Summary

    Although im ok with this solution and i will use it, its far from perfect… If anybody finds something better, please let me know(even in distant future).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to display something such as below. Type A Type A Item 1
I need to write a generic class where the type parameter must be something
In Microsoft IL, to call a method on a value type you need an
Lets say I have a custom data type that looks something like this: public
String[] a = c.toArray(new String[0]); First: Do I need type cast here? (I think
I need a type which can contain a position of an object in a
I'm trying to modify the Django Admin interface. I need a custom type of
I need to check the type of each element in an array... for(id obj
I need to determine file type (i.e., MimeType) of stored data in the SQL
I need to change the type of my primary key column on a table

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.