System.Windows.Forms.HtmlElement.Focusing Event

Occurs when the element first receives user input focus.

Syntax

public event HtmlElementEventHandler Focusing

Remarks

An element that had focus before the user switched to another application using the taskbar or the ALT+TAB keys will receive the HtmlElement.Focusing and HtmlElement.GotFocus events again when the user switches back to your application.

You cannot cancel the default behavior of this event. To remove focus from an element, call HtmlElement.Focus on a different element from within the HtmlElement.GotFocus event.

A HtmlElement.Focusing event on an element will also occur on that element's parents and on the System.Windows.Forms.HtmlDocument class itself, unless you set the HtmlElementEventArgs.BubbleEvent property of the System.Windows.Forms.HtmlElementEventArgs class to true.

For more information about the difference between canceling event bubbling and canceling the default action on an event, see tp://msdn.microsoft.com/en-us/library/ms533022.aspx.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0