1. To visit protected / private sections of the forum you must be connected with your user account. If you are not yet a member of our forum, you can create it now for free!.

User Tag List

Thread: acces child window

Results 1 to 2 of 2

  1. #1
    MortalKombat's Avatar
    Junior Member
    Join Date Apr 2009
    Posts 6
    Like (Stats)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)

    acces child window

    hi everyone
    how can i access to ie child window OR ie popup window in VB6
    in this picture i want to access WebPage Dialog window

    http://uupload.ir/files/sund_111.jpg
  2. #2
    telnet's Avatar
    Hiding Since 2005
    Join Date Jan 2011
    Location Japan - 0day Exploit's -
    Posts 181
    Like (Stats)
    Mentioned
    20 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    36 Post(s)
    You can find the child window of a parent window using the FindWindowEx function.
    Code:
    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
    Eg from goog
    Code:
    Option Explicit
     
    '
    ' Notepad will need to be open before you run this application.
    '
     
    ' Returns a window handle for the window
    ' that matches the the Class and/or Window
    ' name.
    Private Declare Function FindWindow _
        Lib "user32" _
        Alias "FindWindowA" ( _
            ByVal lpClassName As String, _
            ByVal lpWindowName As String) _
            As Long
     
    ' Same as FindWindow with the exception
    ' that FindWindowEx allows us to search
    ' for child windows in a parent window
    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
     
    ' Sends a message to the specified window
    ' 'hwnd' specifies the window handle, wMsg
    ' specifies the message to send and wParam
    ' and lParam are used to send additional
    ' information to the window procedure
    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 Const WM_SETTEXT    As Long = &HC               ' Notifies the window that we are setting text
     
    Private lngParent           As Long                     ' Holds the handle to the Notepad Window
    Private lngChild            As Long                     ' Holds the handle to the Notepad TextBox
     
    Private Sub Form_Load()
        ' Find the handle for Notepad
        lngParent = FindWindow("Notepad", vbNullString)
        ' Find the handle for the text box in the notepad window
        lngChild = FindWindowEx(lngParent, 0&, "Edit", vbNullString)
    End Sub
     
    Private Sub Text1_Change()
        ' If we have a non-zero value from FindWindow function then
        If lngChild Then
            ' Send the the text that is in our text box to notepad
            Call SendMessage(lngChild, WM_SETTEXT, Len(Text1.Text), ByVal Text1.Text)
        End If
    End Sub
    ----
    - Freedom of Speech

    - Want to buy private 0day ? pentest web application ? targeted infiltration ? contact me [gpg4win] {Make sure you got a big pocket}

    - [Exchange] Selling PerfectMoney & PayPal, Give BTC [Exchange] [Bank Wire,PP,WU](1:1) ------> https://www.opensc.ws/showthread.php?t=20544

    ----
  3. Likes root liked this post

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Some got acces to my account.
    By gaywar in forum Off-Topic
    Replies: 67
    Last Post: 03-03-2011, 16:22
  2. WTF?!? at child porn being in search cloud..
    By noobee in forum Off-Topic
    Replies: 1
    Last Post: 05-08-2010, 17:10
  3. Debug Child Process
    By Perplex in forum Delphi Help
    Replies: 1
    Last Post: 10-10-2009, 01:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts