Advertisement

04.28.2008 at 07:08PM PDT, ID: 23360840
[x]
Attachment Details

Tooltip control with MaskedTextBox in VB.Net

Asked by vj_mi in Visual Studio

Hi,

I was reading and trying the maskedtext box sample given in VB.Net 2008 from MSDN. Following is the code:
 Private Sub maskedTextBox1_MaskInputRejected(ByVal sender As Object, ByVal e As System.Windows.Forms.MaskInputRejectedEventArgs) Handles maskedTextBox1.MaskInputRejected
        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,
MIStart Free Trial
[+][-]04.28.2008 at 07:41PM PDT, ID: 21459239

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Studio
Sign Up Now!
Solution Provided By: Wikkard
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628