I need to identify, for example, when we hit a text box in a web page, we get a "| " key sign right (Which would blink, until we type)

If you don't get what i am saying, go to google and click on the search text box, u would see a " | " sign that is blinking.

I need to write a C++ code to identify this sign, as in when the focus changes to this sign to trigger a certain event. I am unable to find what this sign is called. Can some some help me by providing some sample code or a tutorial or some sort of a pointer for me to start learning about this.

6 Years
Discussion Span
Last Post by jonsca
Featured Replies
  • That '|' sign is called a cursor. If you want win32 api GUI program then there are cursor functions, such as [URL="http://msdn.microsoft.com/en-us/library/ms648390(v=vs.85).aspx"]GetCursorPosition()[/URL] Read More


That '|' sign is called a cursor. If you want win32 api GUI program then there are cursor functions, such as GetCursorPosition()

It can't be a cursor, because when you click on the text box the "| " sign appears, then try moving your mouse away, then the cursor position will also change without any change done to the " | " position.

and also i belive that getcursorposition() would give the X and Y axis of the cursor.

Any Idea About This ?

Edited by localp: n/a


Am I correct in assuming you're doing a Windows Forms application? The textBox has a Focused method (http://msdn.microsoft.com/en-us/library/system.windows.forms.control.focused(v=VS.100).aspx , for the latest incarnation, but it goes back to .NET 1.1).

It is still referred to as a cursor, as it was called that long before there were mice or windows hehe :)

The link that you gave, talks about a text box in a windows Form. Mine is different

I have created a WIndows form based web browser, So the web browser that i created has a text box, where you can enter a web address, and click the 'go' button for the web page to appear.

For example say we entered www.google.com, and it opened successfully. In the googl.com home page there is a text box right ? when i click on that there will be a "I-BEAM" icon or " | " sign. I need to identify this sign that appears in google.com's search text bar.

Hope i made my self clear. help appreciated


Yes, you did. Thanks for clarifying. The text box is probably not accessible through your program. I don't remember much about the web browser control, but I don't know that you can pick out elements (like you could in DOM scripting in JavaScript). I think using the HTTPWebRequest type functions you could do your own POST of the page, but I don't know enough about that to help you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.