how to get the window title of a process using vb.net

后端 未结 2 501
萌比男神i
萌比男神i 2021-01-24 15:09

I am looking to go from the process name to the windows title.

e.g

\'winamp.exe\' -> \'1. Britney Spears - Hit me baby one more time\'

Thanks

Sol

2条回答
  •  遥遥无期
    2021-01-24 15:56

    Have a look at the System.Diagnostics.Process class:

    Process p = 
    Console.WriteLine(p.MainWindowTitle)
    

提交回复
热议问题