Click here to Skip to main content
16,019,263 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Sir


Private Sub textDate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles textDate.KeyPress
        If (Microsoft.VisualBasic.Asc(e.KeyChar) < 65) _
             Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 90) _
             And (Microsoft.VisualBasic.Asc(e.KeyChar) < 97) _
             Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 122) Then
            'space accepted
            If (Microsoft.VisualBasic.Asc(e.KeyChar) <> 32) Then
                e.Handled = True
            End If
        End If
        If (Microsoft.VisualBasic.Asc(e.KeyChar) = 8) Then
            
            e.Handled = False
        End If
    End Sub



in this funtion ByVal e As System.Windows.Forms.KeyPressEventArgs says type not define which name space import for this code
Posted
Updated 14-Feb-12 19:57pm
v2

1 solution

The answer is: correct.

Still did not get it? Namespace written in your question is correct. How can you ask "what namespace" if you already know it?

Your confusion might be related to the fact, that by some reason you did not reference assembly where this type is defined. This namespace is "System.Windows.Form", found in CAG (use .NET tab in "Add Assembly" dialog).

If so, you really need to read about assemblies and, separately, about namespace. Those are not much related topics, and both topics are very easy, if you need to know just basics to be able to do your work.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900