Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to determine specific object from Msg.HWnd 'MESSAGE CLOSED'

How to determine specific object from Msg.HWnd 'MESSAGE CLOSED'

Scheduled Pinned Locked Moved Visual Basic
questionlinuxjsonhelptutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mo1492
    wrote on last edited by
    #1

    I think I found the answer by walking the Parent of Msg.HWnd until I find the containing 'Control' window in which FromHandle(hwnd) returns a Control object. In a custom control I have implemented an IMessageFilter to process the WM_MOUSEMOVE message to determine when the mouse is over a particular control. I then try to convert the hWnd to a control with Control.FromHandle(Msg.HWnd). This works for common controls. When the mouse is over as WebBrowser control I get Nothing returned from FromHandle(). I can use api GetClassName() to get the class name which returns either "shell embedding" or "internet explorer_server". The problem is I have more than one WebBrowser instance in the app. and need to distinguish between them. My question is, is there some value I can retrieve using an api with Msg.HWnd that will be unique to the particular instance object? WebBrowser does not have a Text property so GetWindowText() returns "". WebBrowser does have a Tag and Name property but I don't know if that is accessable through a windows api. Thank you

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups