Results 1 to 3 of 3

Thread: Getting the handle of the browser

  1. #1
    Lively Member
    Join Date
    Feb 02
    Posts
    85

    Question Getting the handle of the browser

    I've been able to determine the handle of the IE window my app is working with, but when using SendMessage, I need to pass the handle of the browser... the "viewable" section within the main IE window.

    I'm assuming it would be a child handle to the parent? Any help would be greatly appreciated.

    Thanks in advance,
    - Sam

  2. #2
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 01
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    59,465
    FindWindow to get the main window handle and then use
    FindWindowEx to drill down the window structure to the
    appropriate child window, passing the main window handle in the
    FindWindowEx API call.

    Use MS Spy++ to determine the window structure of the IE window.

    HTH
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (VBA, VB 6, VB.NET, C#)
    Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista (New)Multiple .NET Framework Versions (New)Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 150 GB HDs RAID 1, 2 GBs DDR2 667 MHz RAM, 3 Viewsonic 17" LCDs, Windows Vista RTM, IE 7, Office 2007

  3. #3
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 02
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152
    Have you tried API SPY

    you can double check to make sure your code is correct, by generating the proper code.
    btw IE classname is IEFRAME ..ithink
    sure you can get the handle my that

    eg.
    dim x as longg
    x = findwindow ("IEFRAME",vbnullstring)


    ice
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

Posting Permissions

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