以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  在窗口的textbox格式问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=136708)

--  作者:lswwsl
--  发布时间:2019/6/19 16:03:00
--  在窗口的textbox格式问题
如何在窗口的textbox控件中输入内容必须为邮件地址格式
--  作者:有点甜
--  发布时间:2019/6/19 18:20:00
--  

validating事件

 

Dim reg = new System.Text.RegularExpressions.Regex("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$")
If e.sender.text > "" AndAlso reg.Ismatch(e.sender.text) = False Then
    msgbox("不符合")
    e.cancel = True
Else
    msgbox("符合")
End If