"ucasesoftw are" <ucasesoftware@ hotmail.fr> schrieb:[color=blue]
> All SendKeys.Send like ^C, ^V, ^X work in my form with textboxes but
> SendKeys.Send(" ^A") doesn't work ! ??[/color]
The textbox control doesn't support selecting the whole text using a
keyboard shortcut. You may want to use the code below instead:
\\\
If TypeOf Me.ActiveContro l Is TextBox Then
Dim txt As TextBox = DirectCast(Me.A ctiveControl, TextBox)
txt.SelectAll()
End If
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
"ucasesoftw are" <ucasesoftware@ hotmail.fr> schrieb:[color=blue]
> All SendKeys.Send like ^C, ^V, ^X work in my form with textboxes but
> SendKeys.Send(" ^A") doesn't work ! ??[/color]
The textbox control doesn't support selecting the whole text using a
keyboard shortcut. You may want to use the code below instead:
\\\
If TypeOf Me.ActiveContro l Is TextBox Then
Dim txt As TextBox = DirectCast(Me.A ctiveControl, TextBox)
txt.SelectAll()
End If
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Here is the solution for mdi Child
If TypeOf Me.ActiveMdiChi ld.ActiveContro l Is TextBox Then
Dim txt As TextBox =
DirectCast(Me.A ctiveMdiChild.A ctiveControl, TextBox)
txt.SelectAll()
End If
Here is the solution for mdi Child
If TypeOf Me.ActiveMdiChi ld.ActiveContro l Is TextBox Then
Dim txt As TextBox =
DirectCast(Me.A ctiveMdiChild.A ctiveControl, TextBox)
txt.SelectAll()
End If
Comment