Hi,
I was reading and trying the maskedtext box sample given in VB.Net 2008 from MSDN. Following is the code:
Private Sub maskedTextBox1_MaskInputRe
jected(ByV
al sender As Object, ByVal e As System.Windows.Forms.MaskI
nputReject
edEventArg
s) Handles maskedTextBox1.MaskInputRe
jected
ToolTip1.ToolTipTitle = "Input Rejected"
ToolTip1.Show("You can only add numeric characters (0-9) into this date field.", maskedTextBox1, 0, -20, 3000)
End Sub
Here:
a. Why are the parameters and -20 taken? It seems they are x and y co-ordiantes for the toltip ballon. But how are they arrived at?
b. What if I do not want to hard-code these values? Since they may change based on the screen resolution of the user?
c. If I remove these values, the tool-tip ballon goes anywhere. how can I ensure that the baloon is display at the start of the masked textbox?
Regards,
MI
Start Free Trial