I found this tooltip that pops up in MS Word 2010 when someone enters a copy count above 32767, I would like to know how (and if) it is possible to implement a tooltip such as this within a VB.net windows form application.
The built-in ToolTip component creates a tooltip that looks pretty close. Set its IsBalloon property to True. Getting it exactly like Word is not practical, the component doesn't provide any way to override the TOOLINFO.uFlags value so you could specify TTF_CENTERTIP..
I tried the Balloon, but it was unpredictable as to which way it was orientated. However, the following code might get you started... I assume it's not bullet proof so you might need to add some more code.
I used a textbox and a tooltip from the tools menu:
Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox1.TextChanged
If Val(TextBox1.Text) > 100 Then
ToolTip1.Active = True
ToolTip1.Show("Value is to Large", sender, New Drawing.Point(0, sender.Height - 50))
Else
ToolTip1.Active = False
End If
End Sub
I really like this idea... Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With