woowindice(黑山老妖)大侠 :
   你好!谢谢你呀,不过,我信箱的我打不开呀,你能不能再给我发一个.

解决方案 »

  1.   

    Private Sub Command1_Click()
    Dim www As Long
     www = SendMessage(wj, 245, 0, 0)
     YesQQ = 0
    End Sub
    Private Sub Timer1_Timer()
      Dim myLong As Long
     
      
      
    If YesQQ = 0 Then
            myLong = EnumWindows(AddressOf WndEnumProc, myLong)
        Else
            YesQQ = 1
            'AppActivate "QQ用户登录"
            myLong = EnumChildWindows(wfb, AddressOf WndEnumProc2, myLong)End If
    End Sub
    '以下在.bas
    Public wfb As Long, wj As Long
    Public VCount As Integer
    Public YesQQ As IntegerPublic Function WndEnumProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
        Dim WText As String * 512
        Dim bRet As Long, WLen As Long
        Dim www As Long
        WLen = GetWindowTextLength(hwnd)
        bRet = GetWindowText(hwnd, WText, WLen + 1)
          If Left(CStr(WText), 6) = "QQ用户登录" Then
            YesQQ = 1
            wfb = hwnd
                
        End If
            WndEnumProc = 1
    End FunctionPublic Function WndEnumProc2(ByVal hwnd As Long, ByVal lParam As Long) As Long
        Dim WText As String * 512
        Dim i As Integer
        Dim bRet As Long, WLen As Long
        Dim WClass As String * 50
        Dim www As Long
        Dim Edit_s As String * 20
        Dim W_next As Long
        WLen = GetWindowTextLength(hwnd)
        bRet = GetWindowText(hwnd, WText, WLen + 1)
        If Left(CStr(WText), 4) = "注册向导" Then
          ' Form1.Print CStr(WText)
             'ReleaseCapture
         wj = hwnd
         'www1 = SendMessage(hwnd, WM_NCLBUTTONUP, 1, 0)
      
        End If
       
        
        WndEnumProc2 = 1
          
        
    End Function'Get the text of any window
    Function GetText(Ihwnd As Long) As String
        Dim Textlen As Long
        Dim Text As String    Textlen = SendMessage(Ihwnd, WM_GETTEXTLENGTH, 0, 0)
        If Textlen = 0 Then
            GetText = ">No text for this class<"
            Exit Function
        End If
        Textlen = Textlen + 1
        Text = Space$(Textlen)
        Textlen = SendMessage(Ihwnd, WM_GETTEXT, Textlen, ByVal Text)
        GetText = Left$(Text, Textlen)End Function
    '一旦你把QQ打开来,你按下按钮,可以把QQ用户登录的注册向导按钮按下