我需要一些帮助才能ErrorProvider
从 3rd 方应用程序获取工具提示。是否有任何样本可以使其工作?我正在使用 VB NET
问问题
26 次
1 回答
0
我不明白您所说的 3rd 方应用程序是什么意思。要查看工具提示,用户可以将光标移到文本框旁边的红色圆圈上。
Private err As New ErrorProvider()
Private Sub TextBox1_Validating(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles TextBox1.Validating
If TextBox1.Text = "" Then
e.Cancel = True
err.SetError(TextBox1, "This text box cannot be blank.")
Else
err.Clear()
End If
End Sub
于 2019-03-21T03:14:59.817 回答