求助

求助,第1张

概述  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) vCo

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

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

急用!!!!!!!

总结

以上是内存溢出为你收集整理的求助全部内容,希望文章能够帮你解决求助所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1292702.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-10
下一篇 2022-06-10

发表评论

登录后才能评论

评论列表(0条)

保存