本文目录一览:
怎么用VB设计盗号程序
代码Option Explicit
Public Conn As New ADODB.Connection '标记连接对象
Private Sub cmdLogin_Click()
Dim SQL As String
Dim rs_Login As New ADODB.Recordset
If Trim(txtuser.Text) = "" Then '判断输入的用户名是否为空
MsgBox "请输入用户名", vbOKOnly + vbExclamation
txtuser.Text = ""
txtuser.SetFocus
ElseIf txtpwd.Text = "" Then
MsgBox "请输入密码", vbOKOnly + vbExclamation
txtpwd.Text = ""
txtpwd.SetFocus
Else
SQL = "select * from 系统管理 where 用户名='" txtuser.Text "'"
rs_Login.Open SQL, Conn, adOpenKeyset, adLockPessimistic
If rs_Login.EOF = True Then
MsgBox "对不起,没有这个用户", vbOKOnly + vbExclamation
txtuser.Text = ""
txtuser.SetFocus
rs_Login.Close
Else '检验密码是否正确
If rs_Login.Fields(1) = txtpwd.Text Then
UserID = txtuser.Text
UserPow = rs_Login.Fields(2)
rs_Login.Close
Unload Me
FrmLoading.Show
Exit Sub
Else
MsgBox "密码错误,请您重输", vbOKOnly + vbExclamation
txtpwd.Text = ""
txtpwd.SetFocus
rs_Login.Close
End If
End If
End If
End Sub
Private Sub Form_Load() '系统初始化,加载数据库
Dim Connectionstring As String
Connectionstring = "provider=Microsoft.Jet.oledb.4.0;" _
"Data Source=" App.Path "\book.mdb"
Conn.Open Connectionstring
End Sub
Private Sub txtpwd_KeyPress(KeyAscii As Integer) '敲回车直接登陆
If KeyAscii = 13 Then cmdLogin_Click
End Sub
关于用VB *** *** 本地盗号程序的问题
哦,这个啊,可以用label控件的啊,点一下弹出,再点下收进去
要源代码加我 505833944
VB盗号代码
Option Explicit
Declare Function PostMessage Lib "user32" Alias "postmessagea" (ByVal hwnd As Long, ByVal wmsg As Long, ByVal wparam As Long, ByVal lparam As Long) As Long
Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Const wm_close = H10
Public Function killie(ByVal hwnd As Long, ByVal lparam As Long) As Boolean
Dim ClassName As String
Dim str5 As String
Dim len5 As Long, i As Long
str5 = String(255, 0)
len5 = 256
GetClassName hwnd, str5, 256
ClassName = Left(str5, insrt(1, str5, Chr(0)) - 1)
Debug.Print ClassName
If ClassName = "ieframe" Then
PostMessage hwnd, wm_close, 0, 0
End If
killie = True
End Function
一个自定义函数 获取指定句柄de类名 如果是ieframe则向该窗口发送关闭消息