Results 1 to 3 of 3

Thread: Getting the handle of the browser

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    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
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    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 (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions 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 i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    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
  •  



Click Here to Expand Forum to Full Width