加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

求助

发布时间:2020-12-16 22:54:53 所属栏目:大数据 来源:网络整理
导读:650) this.width=650;" src="http://img.jb51.cc/vcimg/static/loading.png" alt="" src="file:///C:/Documents%20and%20Settings/Administrator/Application%20Data/Tencent/Users/344365613/QQ/WinTemp/RichOle/JN`8FMCQM3U(`MWF](JZY4V.jpg"> Dim vCode A

Dim vCode As String

Private Sub Command1_Click()

drawvc

End Sub


Private Sub drawvc() '显示校验码

Dim i,vc,px,py As Long

Dim r,g,b As Byte

Randomize '初始化随机种子
'生成随机校验码
vc = CLng(8999 * Rnd + 1000)

vCode = vc
'显示校验码
Picture1.Cls

Picture1.Print vc
'添加噪点(防止自动图像识别)

For i = 0 To 2000 '画2000个噪点
'画点随机位置

px = CLng(Picture1.Width * Rnd)

py = CLng(Picture1.Height * Rnd)
'画点随机颜色
r = CByte(255 * Rnd)

g = CByte(255 * Rnd)

b = CByte(255 * Rnd)

Picture1.Line (px,py)-(px + 1,py + 1),RGB(r,b)

Next

End Sub

Private Sub Form_Load()

Text1.Text = ""

Text2.Text = ""

Text3.Text = ""

Picture1.FontSize = 12

Picture1.FontBold = True

Picture1.AutoRedraw = True

drawvc

End Sub


Private Sub Command2_Click()

Adodc1.RecordSource = "select * from useri where id='" & Text1.Text & "' and password='" & Text2.Text & "'"

Adodc1.Refresh

If Adodc1.Recordset.RecordCount > 0 And Text3.Text = vCode Then

MsgBox ("登陆成功")

ElseIf Text1.Text = "" Then

MsgBox ("用户名不能为空!"),vbOKOnly + vbInformation,"警告"


ElseIf Text2.Text = "" Then

MsgBox ("密码不能为空!"),"警告"


ElseIf Text3.Text = "" Then

MsgBox ("请输入验证码!"),"警告"
Else

MsgBox ("您输入的密码或用户名错误"),"警告"

End If

End Sub


Private Sub Command3_Click()

End

End Sub

哪位高手帮我看看错在哪????

急用!!!!!!!

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读