Results 1 to 4 of 4

Thread: Getting Window name

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2009
    Posts
    198

    Getting Window name

    Im wounder how would I find the name for a window and place the name in a textbox


    EX: The form will look for all the window name running an paste all the names in the textbox1



    I looked on google theres only VB6 O.o


    How would I do this?

    -Thanks

  2. #2
    Fanatic Member Vectris's Avatar
    Join Date
    Dec 2008
    Location
    USA
    Posts
    941

    Re: Getting Window name

    Look under the Processes (or Process I forget which) and you will find something like GetProcesses.

    Then make a For Each loop through them and there is a .GetProcessName attribute (once again it may be different, I don't remember exact name) that will give you the title of the window, if there is one.

    I'd give you more specifics but I don't have time to find the exact names.
    If your problem is solved, click the Thread Tools button at the top and mark your topic as Resolved!

    If someone helped you out, click the button on their post and leave them a comment to let them know they did a good job

    __________________
    My Vb.Net CodeBank Submissions:
    Microsoft Calculator Clone
    Custom TextBox Restrictions
    Get the Text inbetween HTML Tags (or two words)

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Getting Window name

    What exactly do you mean by "window name"? Are you looking for the same list as you find in the Applications tab of the Task Manager? If so then you'll want MainWindowTitle rather than ProcessName, which is what you see in the Processes tab of the Task Manager.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4
    Fanatic Member Vectris's Avatar
    Join Date
    Dec 2008
    Location
    USA
    Posts
    941

    Re: Getting Window name

    My mistake, that's what I get for being up late...

    I meant get the process of the window and then use GetMainWindowTitle, thanks for the correction jmc
    If your problem is solved, click the Thread Tools button at the top and mark your topic as Resolved!

    If someone helped you out, click the button on their post and leave them a comment to let them know they did a good job

    __________________
    My Vb.Net CodeBank Submissions:
    Microsoft Calculator Clone
    Custom TextBox Restrictions
    Get the Text inbetween HTML Tags (or two words)

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