CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Posts
    8

    Google CHrome URI

    Hello,

    I know that it's possible to get URI from Google Chome address bar, by finding address bar handle, but how I can check if user is writing something in the address bar at the moment? Is it posible to get focused object handle and compare with address bar handle?

  2. #2
    Join Date
    Jan 2010
    Posts
    76

    Re: Google CHrome URI

    Well you can extract the text from it. I was able to do the same with another browser in VB6. So if its can be done in VB it should be done in C++ too.

    If you wan't I can try to find the VB code and maybe it can be converted into C++ code.

  3. #3
    Join Date
    Feb 2010
    Posts
    8

    Re: Google CHrome URI

    Quote Originally Posted by Senith View Post
    Well you can extract the text from it. I was able to do the same with another browser in VB6. So if its can be done in VB it should be done in C++ too.

    If you wan't I can try to find the VB code and maybe it can be converted into C++ code.
    I know that you can get text from address bar, I've already done that. But what if user is writing somenthing in the address bar when I'm getting text?

  4. #4
    Join Date
    Nov 2007
    Posts
    613

    Re: Google CHrome URI

    I'm unfamiliar with the Chrome UI, but it must work the same way the IE do, so I think it won't be a problem to translate it into the case of Chrome.

    What you need is to intercept the clicks on the "Go" button and keyboard messages. When the user finishes typing he will click that button or hit the Enter key. That's the signal that editing of the address is finished.

    So, if the last pressed key is Enter (or a click on "Go") he's is not typing. If the last pressed key is one of the characters accepted in an URI, he's just typing.

    To get the keyboard and mouse messages, you can use a hook or window subclassing.

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