求助,大侠们帮忙看一下,谢谢,急!急!急!
用VB做一个QQ2007的登录器Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Option Explicit
Private Const WM_SETTEXT = &HC
Private Const BM_CLICK = &HF5
Dim password(100) As Long
Public a As String, b As Long
Private Sub Command1_Click()
ShellExecute Me.hwnd, "open", Text1.Text, vbNullString, vbNullString, vbNormalFocus
Dim QQHwnd As Long, QHwnd As Long, PHwnd As Long, RHwnd As Long
Do While RHwnd = 0
QQHwnd = FindWindow("#32770", vbNullString)
QHwnd = FindWindowEx(QQHwnd, 0, "ComboBox", vbNullString)
PHwnd = FindWindowEx(QQHwnd, 0, "Edit", vbNullString)
RHwnd = FindWindowEx(QQHwnd, 0, "Button", "登录")
DoEvents
Loop
a = Combo1.List(Combo1.ListIndex)
b = password(Combo1.ListIndex)
SendMessage QHwnd, WM_SETTEXT, 0, ByVal a 'QQ号码.
SendMessage PHwnd, WM_SETTEXT, 0, ByVal b '为密码.
SendMessage RHwnd, BM_CLICK, 0, 0 '点击登录按钮
End
就是写不进去密码,大侠们帮忙看一下,谢谢,急!急!急!