我的问题:
我在文本框上使用气球提示来指示非数字输入(实时)。一旦输入了第二个非数字字符,球囊尖端位置和杆方向就会改变(反转并且不希望出现
重现:
- 在 Visual Studio 中,在设计模式下,将文本框和工具提示拖到新窗体上。
- 按原样使用以下内容:
代码:
Public Class Form1
Private Sub Textbox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If (Not IsNumeric(TextBox1.Text) And TextBox1.Text.Length > 0) Then
ToolTip1.ToolTipTitle = "Input must be numeric!"
ToolTip1.Active = True
ToolTip1.IsBalloon = True
ToolTip1.Show(vbNewLine, TextBox1, 45, -40)
Else
ToolTip1.Active = False
ToolTip1.Hide(TextBox1)
End If
End Sub
End Class