Results 1 to 4 of 4

Thread: [RESOLVED] How to get the full file path of an hwnd number?

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2008
    Posts
    60

    Resolved [RESOLVED] How to get the full file path of an hwnd number?

    I'm enumerating the windows taskbar to get the hwnd of all open windows. I want to take the hwnd number and use it to find the full file path to the program associated with the hwnd number.

    For example, Notepad is running and it's hwnd is 1234. I want to be able to plug in hwnd 1234 and get a string value return of "C:/Windows/Notepad.exe"

    How would I go about doing this? *without including an external dll

    Much thanks to anyone who can help me figure this out!

  2. #2
    gibra
    Guest

    Re: How to get the full file path of an hwnd number?


  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: How to get the full file path of an hwnd number?

    gibra's link is good, but there are plenty of gotchas you may need to code around. Here is the official MSDN documentation.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4

    Thread Starter
    Member
    Join Date
    Dec 2008
    Posts
    60

    Re: How to get the full file path of an hwnd number?

    So far so good using gibra's link. Thanks for the documentation link LaVolpe, much appreciation to both of you.

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