0

Is there a way to determine if an item, in my case the webbrowser, is selected?

example: control.select() = true;

note: I know that the example is not correct, but it is only to show an example of what I want.

When I do a button that executes: webBrowser1.Select();

It selects correctly but if its executed twice. It becomes unselected.

I understand why it happens, but is there way to make it selected that doesn't get unselected if executed twice.

Eranga
  • 32,181
  • 5
  • 97
  • 96
Joe DF
  • 5,438
  • 6
  • 41
  • 63
  • Can you elaborate on the context of your question? It almost sounds like you're asking in the context of Winforms but I can't be sure. Can you verify? Do you mean something like [this](http://stackoverflow.com/questions/435433/what-is-the-preferred-way-to-find-focused-control-in-winforms-app)? – M.Babcock Jan 22 '12 at 03:45

1 Answers1

2

Use ContainsFocus or Focused property to determine if control has focus.

Kirill Polishchuk
  • 54,804
  • 11
  • 122
  • 125