ByVal e作为System.Windows.Forms.KeyPressEventArgs [英] ByVal e As System.Windows.Forms.KeyPressEventArgs

查看:153
本文介绍了ByVal e作为System.Windows.Forms.KeyPressEventArgs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生


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




在此函数中,ByVal作为System.Windows.Forms.KeyPressEventArgs说类型不定义为此代码导入的名称空间.




in this funtion ByVal e As System.Windows.Forms.KeyPressEventArgs says type not define which name space import for this code

推荐答案

答案是:正确. >
还是没有得到?您的问题中写的命名空间是正确的.您如何询问什么名称空间",如果您已经知道呢?

您的困惑可能与以下事实有关:由于某种原因,您没有引用定义此类型的程序集.此命名空间是在CAG中找到的"System.Windows.Form"(使用添加程序集"对话框中的.NET选项卡).

如果是这样,您确实需要阅读有关程序集的信息,以及有关名称空间的信息.如果您只需要基本知识就能完成工作,这些主题就不那么相关了,而且这两个主题都非常容易.

—SA
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


这篇关于ByVal e作为System.Windows.Forms.KeyPressEventArgs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆