'Declaration Public Overridable Property CanFocus As Boolean
'Usage Dim instance As ElementWindowless Dim value As Boolean instance.CanFocus = value value = instance.CanFocus
public virtual bool CanFocus {get; set;}
'Declaration Public Overridable Property CanFocus As Boolean
'Usage Dim instance As ElementWindowless Dim value As Boolean instance.CanFocus = value value = instance.CanFocus
public virtual bool CanFocus {get; set;}
Use this property to specify whether an element can receive the focus.
If this property is true, you can check whether the element has the focus, or move the focus to the element, by calling the Focus method or check whether the element has the focus using the Focused property.
Specify whether and how the focus rectangle appears in the element by setting the DrawFocusRectangle property. Specify the position of the cursor when the element receives the focus by setting the EditModeCursorPosition property, if appropriate.
If you do not want the element to receive focus nor for the user to interact with it, set the Enabled property to false.
This property is available at run time only.
Contrast this property with the Selectable property and the Enabled property. Use the Selectable property to specify whether users can interact with the element. Use the Enabled property to specify whether the element looks grayed and users can interact with it.
private void button1_Click(object sender, System.EventArgs e) { element.Visible = true; element.Enabled = false; element.Selectable = false; element.CanFocus = false; }
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click element.Visible = True element.Enabled = False element.Selectable = False element.CanFocus = False End Sub