求验证码如何在 Form 代码怎么写
Private Sub Form_Load()Dim conn As New ADODB.Connection
Dim connectionstring As String
connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "D:\glxt.mdb;Persist Security Info=False"
End Sub
Private Sub Image1_Click()
Image1.ZOrder 0 ''0
End Sub
Private Sub Picture1_Click()
Dim vCode As String
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
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, g, b)
Next
End Sub