1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to read HTML in textbox in real time with cursor on web browser?

Discussion in 'Visual Basic .NET' started by simpleonline1234, Sep 16, 2011.

  1. simpleonline1234

    simpleonline1234 Junior Member

    Joined:
    Jan 26, 2010
    Messages:
    169
    Likes Received:
    13
    How would one be able to sync the cursor on a web browser to the html placed in a richtextbox?

    I am able to get the source code of a web page and put it into a rich textbox

    How can I setup a caret to sync up in real time with my mouse on the web page?

    Thanks
     
  2. artizhay

    artizhay BANNED BANNED

    Joined:
    Nov 21, 2010
    Messages:
    1,867
    Likes Received:
    1,335
    Could you elaborate on what you're trying to do? Are you trying to move the actual mouse pointer to the text box, or just focus the cursor on the textbox automatically so the user can begin typing? Or if something else, please explain.
     
  3. simpleonline1234

    simpleonline1234 Junior Member

    Joined:
    Jan 26, 2010
    Messages:
    169
    Likes Received:
    13
    Well what I'm trying to do is to have the html of a web page downloaded and viewable in a textbox.

    When I move the cursor around to input elements like textboxes I want the caret to highlight in the code in the textbox where the pointer is in on the web page.

    I am using this to grab the elements of the page.
     
  4. smack

    smack Junior Member

    Joined:
    Feb 1, 2010
    Messages:
    182
    Likes Received:
    78
    Occupation:
    Software Engineer/Evil Genius
    Location:
    inside .NET
    you're basically looking to replicate the functionality of IE's "Developer Tools" >> Find Item By Click.

    this would be very tricky to pull off.
     
  5. Hydrogen

    Hydrogen Newbie

    Joined:
    Dec 30, 2009
    Messages:
    39
    Likes Received:
    23
    Occupation:
    Co-Owner of AdvertMarketing
    Home Page:
    It's certainly possible, however I think you are going to find there will be significant amount of work involved and definitely not enough room to explain how in a single forum post.

    You will do good to read up on Windows API calls Pinvoke is a very good resource to get started with. You will be dealing with alot of x-thread / x-process calls to send and receive data back and forth between your app and the browser. And to keep things as simple as possible I suggest only adding IE functionality as there is not that much information out there about interacting with other types of browsers (ie. FF, Chrome, Opera, Safari...etc)