意思是说不允许用户在text控件内输入空格,请各位兄弟帮忙顶下!!!

解决方案 »

  1.   

    private sub Text1_KeyPress(keyAscii as integer)
    if chr(keyascii) ="" then
      keyascii=0
    end if
    end sub
      

  2.   

    private sub text1_keypress(keyascii as integer)
        if keyascii=chr("") then
                keyascii=0
        end if
    end sub
      

  3.   


      xiuyuan() 兄弟,多谢了.
     itlive(好友(失业中,泡几天CSDN)) ...兄弟你的有问题,类型不正确.
      

  4.   

    private sub Text1_KeyPress(keyAscii as integer)
    if keyascii =vbkeyspace then
      keyascii=0
    end if
    end sub
      

  5.   

    Private Sub Text1_KeyPress(KeyAscii As Integer)
        If KeyAscii = 32 Then KeyAscii = 0
    End Sub